Chemical Data Processing Library C++ API - Version 1.1.1
|
TopologicalEntityAlignment. More...
#include <TopologicalEntityAlignment.hpp>
Public Types | |
typedef T | EntityType |
The actual entity type. More... | |
typedef std::vector< const EntityType * > | EntitySet |
The container storing the entities to align. More... | |
typedef boost::indirect_iterator< typename EntitySet::const_iterator, const EntityType > | ConstEntityIterator |
A constant iterator over the stored entities. More... | |
typedef std::function< bool(const EntityType &, const EntityType &)> | EntityMatchFunction |
A generic wrapper class used to store a user-defined entity match constraint function. More... | |
typedef std::function< bool(const EntityType &, const EntityType &, const EntityType &, const EntityType &)> | EntityPairMatchFunction |
A generic wrapper class used to store a user-defined entity-pair match constraint function. More... | |
Public Member Functions | |
TopologicalEntityAlignment () | |
Constructs the TopologicalEntityAlignment instance. More... | |
virtual | ~TopologicalEntityAlignment () |
Virtual destructor. More... | |
void | setEntityMatchFunction (const EntityMatchFunction &func) |
Specifies a function for restricting allowed entity mappings in the search for alignment solutions. More... | |
const EntityMatchFunction & | getEntityMatchFunction () const |
Returns the function that was registered for restricting allowed entity mappings. More... | |
void | setEntityPairMatchFunction (const EntityPairMatchFunction &func) |
Specifies a function for checking the compatibility of entity-pairs in the search for alignment solutions. More... | |
const EntityPairMatchFunction & | getEntityPairMatchFunction () const |
Returns the function that was registered for checking the compatibility of entity-pairs. More... | |
void | addEntity (const EntityType &entity, bool first_set) |
Adds an entity to the specified alignment entity set. More... | |
void | clearEntities (bool first_set) |
Removes all entities in the specified alignment entity set. More... | |
std::size_t | getNumEntities (bool first_set) const |
Returns the number of entities in the specified alignment entity set. More... | |
ConstEntityIterator | getEntitiesBegin (bool first_set) const |
Returns a constant iterator pointing to the beginning of the entities stored in the specified set. More... | |
ConstEntityIterator | getEntitiesEnd (bool first_set) const |
Returns a constant iterator pointing to the end of the entities stored in the specified set. More... | |
const EntityType & | getEntity (std::size_t idx, bool first_set) const |
Returns a non-const reference to the stored entity at index idx in the specified set. More... | |
bool | nextAlignment (Util::STPairArray &mapping) |
Searches for the next alignment solution and stores the corresponding mapping of the entities in the first set to the entities in the second set in the map provided as an argument. More... | |
void | reset () |
typedef T CDPL::Chem::TopologicalEntityAlignment< T >::EntityType |
The actual entity type.
typedef std::vector<const EntityType*> CDPL::Chem::TopologicalEntityAlignment< T >::EntitySet |
The container storing the entities to align.
typedef boost::indirect_iterator<typename EntitySet::const_iterator, const EntityType> CDPL::Chem::TopologicalEntityAlignment< T >::ConstEntityIterator |
A constant iterator over the stored entities.
typedef std::function<bool(const EntityType&, const EntityType&)> CDPL::Chem::TopologicalEntityAlignment< T >::EntityMatchFunction |
A generic wrapper class used to store a user-defined entity match constraint function.
typedef std::function<bool(const EntityType&, const EntityType&, const EntityType&, const EntityType&)> CDPL::Chem::TopologicalEntityAlignment< T >::EntityPairMatchFunction |
A generic wrapper class used to store a user-defined entity-pair match constraint function.
|
inline |
Constructs the TopologicalEntityAlignment
instance.
|
inlinevirtual |
Virtual destructor.
void CDPL::Chem::TopologicalEntityAlignment< T >::setEntityMatchFunction | ( | const EntityMatchFunction & | func | ) |
Specifies a function for restricting allowed entity mappings in the search for alignment solutions.
func | The constraint check function. |
const CDPL::Chem::TopologicalEntityAlignment< T >::EntityMatchFunction & CDPL::Chem::TopologicalEntityAlignment< T >::getEntityMatchFunction |
Returns the function that was registered for restricting allowed entity mappings.
void CDPL::Chem::TopologicalEntityAlignment< T >::setEntityPairMatchFunction | ( | const EntityPairMatchFunction & | func | ) |
Specifies a function for checking the compatibility of entity-pairs in the search for alignment solutions.
func | The constraint check function. |
const CDPL::Chem::TopologicalEntityAlignment< T >::EntityPairMatchFunction & CDPL::Chem::TopologicalEntityAlignment< T >::getEntityPairMatchFunction |
Returns the function that was registered for checking the compatibility of entity-pairs.
void CDPL::Chem::TopologicalEntityAlignment< T >::addEntity | ( | const EntityType & | entity, |
bool | first_set | ||
) |
Adds an entity to the specified alignment entity set.
entity | The entity object to add. |
first_set | If true , the entity is added to the first entity set, if false to the second one. |
void CDPL::Chem::TopologicalEntityAlignment< T >::clearEntities | ( | bool | first_set | ) |
Removes all entities in the specified alignment entity set.
first_set | If true , the first entity set is cleared, if false the second one. |
std::size_t CDPL::Chem::TopologicalEntityAlignment< T >::getNumEntities | ( | bool | first_set | ) | const |
Returns the number of entities in the specified alignment entity set.
first_set | If true , the size of first entity set is returned, if false the size of the second one. |
CDPL::Chem::TopologicalEntityAlignment< T >::ConstEntityIterator CDPL::Chem::TopologicalEntityAlignment< T >::getEntitiesBegin | ( | bool | first_set | ) | const |
Returns a constant iterator pointing to the beginning of the entities stored in the specified set.
first_set | If true , an iterator for first entity set is returned, if false for the second one. |
CDPL::Chem::TopologicalEntityAlignment< T >::ConstEntityIterator CDPL::Chem::TopologicalEntityAlignment< T >::getEntitiesEnd | ( | bool | first_set | ) | const |
Returns a constant iterator pointing to the end of the entities stored in the specified set.
first_set | If true , an iterator for first entity set is returned, if false for the second one. |
const CDPL::Chem::TopologicalEntityAlignment< T >::EntityType & CDPL::Chem::TopologicalEntityAlignment< T >::getEntity | ( | std::size_t | idx, |
bool | first_set | ||
) | const |
Returns a non-const
reference to the stored entity at index idx in the specified set.
idx | The zero-based index of the entity instance to return. |
first_set | true , if the entity to return is stored in the first set. false , if stored in the second set. |
const
reference to the entity stored at index idx in the specified set. Base::IndexError | if the number of entities in the specified set is zero or idx is not in the range [0, getNumEntities() - 1]. |
bool CDPL::Chem::TopologicalEntityAlignment< T >::nextAlignment | ( | Util::STPairArray & | mapping | ) |
Searches for the next alignment solution and stores the corresponding mapping of the entities in the first set to the entities in the second set in the map provided as an argument.
mapping | The map where the entitiy mapping of the found alignment solution has to be stored. |
true
if a new alignment solution could be found, and false
otherwise. void CDPL::Chem::TopologicalEntityAlignment< T >::reset |