FeaturePositionMatchFunctor.
More...
◆ __init__() [1/2]
Initializes a copy of the FeaturePositionMatchFunctor instance func.
- Parameters
-
func | The FeaturePositionMatchFunctor instance to copy. |
◆ __init__() [2/2]
None CDPL.Pharm.FeaturePositionMatchFunctor.__init__ |
( |
bool |
query_mode | ) |
|
Initializes the FeaturePositionMatchFunctor instance.
- Parameters
-
◆ 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()
Replaces the current state of self with a copy of the state of the FeaturePositionMatchFunctor instance func.
- Parameters
-
func | The FeaturePositionMatchFunctor instance to copy. |
- Returns
- self
◆ queryMode()
bool CDPL.Pharm.FeaturePositionMatchFunctor.queryMode |
( |
| ) |
|
◆ __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
-
ftr1 | The first feature. |
ftr2 | 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&)
◆ __call__() [2/2]
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
-
ftr1 | The first feature. |
ftr2 | The second feature. |
xform | The 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&)