BALL  1.4.79
Public Types | Public Member Functions | Protected Attributes | List of all members
BALL::FPTBondOrderStrategy::DPTable_ Class Reference

#include <BALL/STRUCTURE/BONDORDERS/FPTBondOrderStrategy.h>

Public Types

typedef DPMap_::iterator iterator
 
typedef DPMap_::const_iterator const_iterator
 

Public Member Functions

 DPTable_ ()
 
 DPTable_ (DPTable_ const &table)
 
Penalty operator[] (DPConfig_ const &config) const
 
bool insert (DPConfig_ const &config, Penalty penalty)
 
Size size () const
 
Penalty bestPenalty () const
 
DPConstRow_ bestEntry () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 

Protected Attributes

DPMap_ table
 

Detailed Description

The dynamic programming table. Each nice tree decomposition bag has it's own dynamic programming table. They are computed either from leaf-nodes, by forgetting or introducing entries from ancestor-tables in forget/introduce nodes or by merging two tables into one in join-nodes. The rows in this table are different possible bond assignments for the molecule graph. It's columns are the consumed valences of the bag's atoms and bond values of the bag's bonds.

Definition at line 350 of file FPTBondOrderStrategy.h.

Member Typedef Documentation

§ const_iterator

constant iterator above the table entries

Definition at line 378 of file FPTBondOrderStrategy.h.

§ iterator

iterator above the table entries

Definition at line 373 of file FPTBondOrderStrategy.h.

Constructor & Destructor Documentation

§ DPTable_() [1/2]

BALL::FPTBondOrderStrategy::DPTable_::DPTable_ ( )

Default constructor

§ DPTable_() [2/2]

BALL::FPTBondOrderStrategy::DPTable_::DPTable_ ( DPTable_ const &  table)

Copy constructor

Member Function Documentation

§ begin() [1/2]

iterator BALL::FPTBondOrderStrategy::DPTable_::begin ( )

returns an iterator to the first entry.

§ begin() [2/2]

const_iterator BALL::FPTBondOrderStrategy::DPTable_::begin ( ) const

returns a constant iterator to the first entry

§ bestEntry()

DPConstRow_ BALL::FPTBondOrderStrategy::DPTable_::bestEntry ( ) const

returns the entry with best penalty. Because this function throws an exception if the table is empty, you should check this by calling size() before calling this function.

Exceptions
BALL::Exception::IndexOverflowif table is empty

§ bestPenalty()

Penalty BALL::FPTBondOrderStrategy::DPTable_::bestPenalty ( ) const

returns the best penalty in this table or infinite_penalty, if the table is empty

§ end() [1/2]

iterator BALL::FPTBondOrderStrategy::DPTable_::end ( )

returns an iterator to the end of the table

§ end() [2/2]

const_iterator BALL::FPTBondOrderStrategy::DPTable_::end ( ) const

returns a constant iterator to the end of the table

§ insert()

bool BALL::FPTBondOrderStrategy::DPTable_::insert ( DPConfig_ const &  config,
Penalty  penalty 
)

insert a new DPConfig with the given penalty. If the table already contains an equal DPConfig with a lower penalty, this function does nothing.

§ operator[]()

Penalty BALL::FPTBondOrderStrategy::DPTable_::operator[] ( DPConfig_ const &  config) const

returns the penalty of a given DPConfig

§ size()

Size BALL::FPTBondOrderStrategy::DPTable_::size ( ) const

returns the number of rows in this table

Member Data Documentation

§ table

DPMap_ BALL::FPTBondOrderStrategy::DPTable_::table
protected

the table data is represented as a tree map, because this allow fast inserting of DPConfigs and removing duplicates with greater penalty.

Definition at line 357 of file FPTBondOrderStrategy.h.