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

SpatialFeatureMapping. More...

+ Inheritance diagram for CDPL.Pharm.SpatialFeatureMapping:

Public Member Functions

None __init__ (SpatialFeatureMapping mapping)
 Initializes a copy of the SpatialFeatureMapping instance mapping. More...
 
None __init__ (bool query_mode=False)
 Constructs a SpatialFeatureMapping instance. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
SpatialFeatureMapping assign (SpatialFeatureMapping mapping)
 Replaces the current state of self with a copy of the state of the SpatialFeatureMapping instance mapping. More...
 
None perceive (FeatureContainer ref_ftrs, FeatureContainer aligned_ftrs, Math.Matrix4D xform)
 
None setTypeMatchFunction (BoolFeature2Functor func)
 Specifies a function for testing the type compatibility of features. More...
 
BoolFeature2Functor getTypeMatchFunction ()
 Returns the function that was registered for testing the type compatibility of the features. More...
 
None setPositionMatchFunction (DoubleFeature2Matrix4DFunctor func)
 Specifies a function for checking the proximity of mapped feature positions. More...
 
DoubleFeature2Matrix4DFunctor getPositionMatchFunction ()
 Returns the function that was registered for checking the proximity of mapped feature positions. More...
 
None setGeometryMatchFunction (DoubleFeature2Matrix4DFunctor func)
 Specifies a function for checking the match of mapped feature geometries. More...
 
DoubleFeature2Matrix4DFunctor getGeometryMatchFunction ()
 Returns the function that was registered for checking the match of mapped feature geometries. More...
 
float getPositionMatchScore (Feature ref_ftr, Feature aligned_ftr)
 
float getGeometryMatchScore (Feature ref_ftr, Feature aligned_ftr)
 
- Public Member Functions inherited from CDPL.Pharm.FeatureMapping
None __init__ ()
 Creates an empty map.
 
None __init__ (FeatureMapping mapping)
 Initializes a copy of the FeatureMapping instance mapping. More...
 
int getSize ()
 Returns the size (number of entries) of the map. More...
 
bool isEmpty ()
 Tells whether the map is empty (getSize() == 0). More...
 
None clear ()
 Erases all entries.
 
FeatureMapping assign (FeatureMapping map)
 Replaces the current state of self with a copy of the state of the FeatureMapping instance map. More...
 
Feature getValue (Feature key)
 Returns a reference to the first value associated with the specified key. More...
 
Feature getValue (Feature key, Feature def_value)
 Returns a reference to the first value associated with the specified key, or the value given by the second argument if an entry with the given key does not exist. More...
 
bool removeEntry (Feature key)
 Removes the first entry with the specified key from the map. More...
 
None setEntry (Feature key, Feature value)
 Replaces all entries with a key equivalent to key with a single copy of the key/value pair (key, value). More...
 
object getKeys ()
 
object keys ()
 
object getValues ()
 
object getValues (Feature key)
 
object values ()
 
object getEntries ()
 
object items ()
 
int getNumEntries (Feature key)
 Returns the number of entries with the specified key. More...
 
int removeEntries (Feature key)
 Removes all entries with the specified key from the map. More...
 
None insertEntry (Feature key, Feature value)
 Inserts a new entry with specified key and value into the map. More...
 
int __len__ ()
 
Feature __getitem__ (Feature key)
 
None __setitem__ (Feature key, Feature value)
 
bool __delitem__ (Feature key)
 
int __contains__ (Feature key)
 Returns the result of the membership test operation key in self. More...
 

Properties

 objectID = property(getObjectID)
 
 typeMatchFunction = property(getTypeMatchFunction, setTypeMatchFunction)
 
 positionMatchFunction = property(getPositionMatchFunction, setPositionMatchFunction)
 
 geometryMatchFunction = property(getGeometryMatchFunction, setGeometryMatchFunction)
 
- Properties inherited from CDPL.Pharm.FeatureMapping
 objectID = property(getObjectID)
 
 size = property(getSize)
 

Detailed Description

SpatialFeatureMapping.

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Pharm.SpatialFeatureMapping.__init__ ( SpatialFeatureMapping  mapping)

Initializes a copy of the SpatialFeatureMapping instance mapping.

Parameters
mappingThe SpatialFeatureMapping instance to copy.

◆ __init__() [2/2]

None CDPL.Pharm.SpatialFeatureMapping.__init__ ( bool   query_mode = False)

Constructs a SpatialFeatureMapping instance.

Parameters
query_modeIf True, the reference feature container is interpreted as a query feature container and some of the set default functions will operate in a special query mode.

Member Function Documentation

◆ getObjectID()

int CDPL.Pharm.SpatialFeatureMapping.getObjectID ( )

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

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

Reimplemented from CDPL.Pharm.FeatureMapping.

◆ assign()

SpatialFeatureMapping CDPL.Pharm.SpatialFeatureMapping.assign ( SpatialFeatureMapping  mapping)

Replaces the current state of self with a copy of the state of the SpatialFeatureMapping instance mapping.

Parameters
mappingThe SpatialFeatureMapping instance to copy.
Returns
self

◆ perceive()

None CDPL.Pharm.SpatialFeatureMapping.perceive ( FeatureContainer  ref_ftrs,
FeatureContainer  aligned_ftrs,
Math.Matrix4D  xform 
)
Parameters
ref_ftrs
aligned_ftrs
xform

◆ setTypeMatchFunction()

None CDPL.Pharm.SpatialFeatureMapping.setTypeMatchFunction ( BoolFeature2Functor  func)

Specifies a function for testing the type compatibility of features.

Parameters
funcThe type compatibility test function.

◆ getTypeMatchFunction()

BoolFeature2Functor CDPL.Pharm.SpatialFeatureMapping.getTypeMatchFunction ( )

Returns the function that was registered for testing the type compatibility of the features.

Returns
The registered type compatibility test function.

◆ setPositionMatchFunction()

None CDPL.Pharm.SpatialFeatureMapping.setPositionMatchFunction ( DoubleFeature2Matrix4DFunctor  func)

Specifies a function for checking the proximity of mapped feature positions.

Parameters
funcThe position proximity test function.

◆ getPositionMatchFunction()

DoubleFeature2Matrix4DFunctor CDPL.Pharm.SpatialFeatureMapping.getPositionMatchFunction ( )

Returns the function that was registered for checking the proximity of mapped feature positions.

Returns
The registered position proximity test function.

◆ setGeometryMatchFunction()

None CDPL.Pharm.SpatialFeatureMapping.setGeometryMatchFunction ( DoubleFeature2Matrix4DFunctor  func)

Specifies a function for checking the match of mapped feature geometries.

Parameters
funcThe feature geometry match test function.

◆ getGeometryMatchFunction()

DoubleFeature2Matrix4DFunctor CDPL.Pharm.SpatialFeatureMapping.getGeometryMatchFunction ( )

Returns the function that was registered for checking the match of mapped feature geometries.

Returns
The registered geometry match test function.

◆ getPositionMatchScore()

float CDPL.Pharm.SpatialFeatureMapping.getPositionMatchScore ( Feature  ref_ftr,
Feature  aligned_ftr 
)
Parameters
ref_ftr
aligned_ftr
Returns

◆ getGeometryMatchScore()

float CDPL.Pharm.SpatialFeatureMapping.getGeometryMatchScore ( Feature  ref_ftr,
Feature  aligned_ftr 
)
Parameters
ref_ftr
aligned_ftr
Returns