Chemical Data Processing Library Python API - Version 1.2.0
Public Member Functions | Properties | List of all members
CDPL.Pharm.FeaturePairDistanceMatchFunctor Class Reference

FeaturePairDistanceMatchFunctor. More...

+ Inheritance diagram for CDPL.Pharm.FeaturePairDistanceMatchFunctor:

Public Member Functions

None __init__ (FeaturePairDistanceMatchFunctor func)
 Initializes a copy of the FeaturePairDistanceMatchFunctor instance func. More...
 
None __init__ (bool query_mode)
 Constructs the FeaturePairDistanceMatchFunctor instance. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
bool queryMode ()
 
FeaturePairDistanceMatchFunctor assign (FeaturePairDistanceMatchFunctor func)
 Replaces the current state of self with a copy of the state of the FeaturePairDistanceMatchFunctor instance func. More...
 
bool __call__ (Feature p1_ftr1, Feature p1_ftr2, Feature p2_ftr1, Feature p2_ftr2)
 Checks if the feature pairs (p1_ftr1, p1_ftr2) and (p2_ftr1, p2_ftr2) are matching in terms of their feature distance. More...
 

Properties

 objectID = property(getObjectID)
 
 qryMode = property(queryMode)
 

Detailed Description

FeaturePairDistanceMatchFunctor.

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Pharm.FeaturePairDistanceMatchFunctor.__init__ ( FeaturePairDistanceMatchFunctor  func)

Initializes a copy of the FeaturePairDistanceMatchFunctor instance func.

Parameters
funcThe FeaturePairDistanceMatchFunctor instance to copy.

◆ __init__() [2/2]

None CDPL.Pharm.FeaturePairDistanceMatchFunctor.__init__ ( bool  query_mode)

Constructs the FeaturePairDistanceMatchFunctor instance.

Parameters
query_modeIf True, the second pair feature distance must fall in the distance +/- tolerances of the first pair for the compatibility check to succeed. If False, it is sufficient that any one of the pairs matches the distance range of the other.

Member Function Documentation

◆ getObjectID()

int CDPL.Pharm.FeaturePairDistanceMatchFunctor.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python FeaturePairDistanceMatchFunctor instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two FeaturePairDistanceMatchFunctor instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ queryMode()

bool CDPL.Pharm.FeaturePairDistanceMatchFunctor.queryMode ( )
Returns

◆ assign()

FeaturePairDistanceMatchFunctor CDPL.Pharm.FeaturePairDistanceMatchFunctor.assign ( FeaturePairDistanceMatchFunctor  func)

Replaces the current state of self with a copy of the state of the FeaturePairDistanceMatchFunctor instance func.

Parameters
funcThe FeaturePairDistanceMatchFunctor instance to copy.
Returns
self

◆ __call__()

bool CDPL.Pharm.FeaturePairDistanceMatchFunctor.__call__ ( Feature  p1_ftr1,
Feature  p1_ftr2,
Feature  p2_ftr1,
Feature  p2_ftr2 
)

Checks if the feature pairs (p1_ftr1, p1_ftr2) and (p2_ftr1, p2_ftr2) are matching in terms of their feature distance.

Parameters
p1_ftr1The first feature of the first pair.
p1_ftr2The second feature of the first pair.
p2_ftr1The first feature of the second pair.
p2_ftr2The second feature of the second pair.
Returns
True if the feature pair distance are compatible, and False otherwise.
See also
FeaturePairDistanceMatchFunctor()