BALL
1.4.2
|
#include <BALL/STRUCTURE/BONDORDERS/FPTBondOrderStrategy.h>
Public Member Functions | |
DPConfig_ () | |
DPConfig_ (Size atoms, Size bonds) | |
DPConfig_ (std::vector< Valence > const &v, std::vector< BondOrder > const &bo) | |
DPConfig_ & | operator= (DPConfig_ const ©) |
template<typename ValenceIterator , typename BondIterator > | |
DPConfig_ (ValenceIterator vit, ValenceIterator vend, BondIterator boit, BondIterator boend) | |
bool | operator< (DPConfig_ const &conf) const |
bool | operator> (DPConfig_ const &conf) const |
bool | operator<= (DPConfig_ const &conf) const |
bool | operator>= (DPConfig_ const &conf) const |
bool | operator== (DPConfig_ const &conf) const |
int | compare (DPConfig_ const &other) const |
Size | numberOfAtoms () const |
Size | numberOfBonds () const |
Public Attributes | |
std::vector< Valence > | consumed_valences |
std::vector< BondOrder > | bond_assignments |
A DPConfig_ is an entry in a dynamic programming table. It holds the current bond-order assignments, and the valences, which were consumed after forgetting some bonds in forget-nodes. Each DPConfig belongs to just one node in the nice tree decomposition. So it contains just the valences and bondvalues of the atoms and bonds in the bag. DPConfigs are computed in Leaf-nodes or by one (or two) ancestor tables by forgetting, introducing or merging their entries. So even if a DPConfig is empty (as in the root table), you can get the assignment of all ancestors by backtracking the computing of this DPConfig.
Definition at line 220 of file FPTBondOrderStrategy.h.
BALL::FPTBondOrderStrategy::DPConfig_::DPConfig_ | ( | ) |
Default constructor
Builds a new DPConfig with the given number of atoms and bonds. The valence and bond values are filled with 0.
BALL::FPTBondOrderStrategy::DPConfig_::DPConfig_ | ( | std::vector< Valence > const & | v, |
std::vector< BondOrder > const & | bo | ||
) |
Builds a new DPConfig with the given atom-valences and bond-values
|
inline |
Builds a new DPConfig and initialize its valences and bond-values with the values which are iterated by the given iterators
Definition at line 248 of file FPTBondOrderStrategy.h.
int BALL::FPTBondOrderStrategy::DPConfig_::compare | ( | DPConfig_ const & | other | ) | const |
Comparison is needed to insert a DPConfig into a tree-map. A DPConfig is equal to another DPConfig if it's valences and bond-values are equal. Other comparisons are done by comparing each valence and bond value seperately. You can compare only entries from the same table or from tables which belong to the same nice tree decomposition bag. The number of valences and bounds have to be equal.
other | another entry of the same table |
BALL::Exception::InvalidArgument | if two entries of different tables are compared |
Size BALL::FPTBondOrderStrategy::DPConfig_::numberOfAtoms | ( | ) | const |
returns the number of atoms of the bag this entry belongs to.
Size BALL::FPTBondOrderStrategy::DPConfig_::numberOfBonds | ( | ) | const |
returns the number of bonds of the bag this entry belongs to.
Assignment operator
std::vector<BondOrder> BALL::FPTBondOrderStrategy::DPConfig_::bond_assignments |
Holds the current assigned bond values. Every time a new bond is visited in an introduce node, entries for each possible bond value of this bond are inserted into the table. Single bonds habe a bond value of 0, double bonds have the bond value 1 and tripple bonds have the bond value 2. So increasing the valences means adding the bond value + 1 (!) to the valence value.
Definition at line 314 of file FPTBondOrderStrategy.h.
std::vector<Valence> BALL::FPTBondOrderStrategy::DPConfig_::consumed_valences |
Every time a bond is forgotten, the consumed valences of its incident vertices are increased by its bond value + 1. If a atom is forgotten, it's consumed valences holds the final valence assignment of this atom.
Definition at line 305 of file FPTBondOrderStrategy.h.