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

FeaturePositionMatchFunctor. More...

+ Inheritance diagram for CDPL.Pharm.FeaturePositionMatchFunctor:

Public Member Functions

None __init__ (FeaturePositionMatchFunctor func)
 Initializes a copy of the FeaturePositionMatchFunctor instance func. More...
 
None __init__ (bool query_mode)
 Initializes the FeaturePositionMatchFunctor instance. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
FeaturePositionMatchFunctor assign (FeaturePositionMatchFunctor func)
 Replaces the current state of self with a copy of the state of the FeaturePositionMatchFunctor instance func. More...
 
bool queryMode ()
 
bool __call__ (Feature ftr1, Feature ftr2)
 Checks if the distance between ftr1 and ftr2 is below the allowed maximum and calculates a score reflecting their proximity. More...
 
bool __call__ (Feature ftr1, Feature ftr2, Math.Matrix4D xform)
 Checks if the distance between ftr1 and ftr2 is below the allowed maximum and calculates a score reflecting their proximity. More...
 

Properties

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

Detailed Description

FeaturePositionMatchFunctor.

Constructor & Destructor Documentation

◆ __init__() [1/2]

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

Initializes a copy of the FeaturePositionMatchFunctor instance func.

Parameters
funcThe FeaturePositionMatchFunctor instance to copy.

◆ __init__() [2/2]

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

Initializes the FeaturePositionMatchFunctor instance.

Parameters
query_mode

Member Function Documentation

◆ getObjectID()

int CDPL.Pharm.FeaturePositionMatchFunctor.getObjectID ( )

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

Different Python FeaturePositionMatchFunctor 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 FeaturePositionMatchFunctor 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.

◆ assign()

FeaturePositionMatchFunctor CDPL.Pharm.FeaturePositionMatchFunctor.assign ( FeaturePositionMatchFunctor  func)

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

Parameters
funcThe FeaturePositionMatchFunctor instance to copy.
Returns
self

◆ queryMode()

bool CDPL.Pharm.FeaturePositionMatchFunctor.queryMode ( )
Returns

◆ __call__() [1/2]

bool CDPL.Pharm.FeaturePositionMatchFunctor.__call__ ( Feature  ftr1,
Feature  ftr2 
)

Checks if the distance between ftr1 and ftr2 is below the allowed maximum and calculates a score reflecting their proximity.

If in 'query mode', the tolerance of ftr1 specifies the allowed maximum distance. Otherwise, the maximum tolerance of the features takes effect.

Parameters
ftr1The first feature.
ftr2The second feature.
Returns
A score from 0 (=outside effective tolerance) and 1 (exact position match) that specifies the proximity of the features.
See also
Pharm.getPosition(const Feature&), Pharm.getTolerance(const Feature&)

◆ __call__() [2/2]

bool CDPL.Pharm.FeaturePositionMatchFunctor.__call__ ( Feature  ftr1,
Feature  ftr2,
Math.Matrix4D  xform 
)

Checks if the distance between ftr1 and ftr2 is below the allowed maximum and calculates a score reflecting their proximity.

If in 'query mode', the tolerance of ftr1 specifies the allowed maximum distance. Otherwise, the maximum tolerance of the features takes effect.

Parameters
ftr1The first feature.
ftr2The second feature.
xformThe transformation to apply to the position of the second feature.
Returns
A score from 0 (=outside effective tolerance) and 1 (exact position match) that specifies the proximity of the features.
See also
Pharm.getPosition(const Feature&), Pharm.getTolerance(const Feature&)