1 #ifndef BALL_STRUCTURE_BONDORDERS_FPTBONDORDERSTRATEGY_H
2 #define BALL_STRUCTURE_BONDORDERS_FPTBONDORDERSTRATEGY_H
4 #ifndef BALL_COMMON_GLOBAL_H
8 #ifndef BALL_MATHS_COMMON_H
12 #ifndef BALL_KERNEL_ATOMCONTAINER_H
16 #ifndef BALL_KERNEL_BOND_H
20 #ifndef BALL_DATATYPE_HASHMAP_H
24 #ifndef BALL_DATATYPE_GRAPH_H
28 #ifndef BALL_DATATYPE_GRAPH_GRAPHALGORITHMS_H
32 #ifndef BALL_DATATYPE_GRAPH_TREEWIDTH_H
36 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENTSTRATEGY_H
40 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENT_H
52 #include <boost/shared_ptr.hpp>
53 #include <boost/ref.hpp>
191 virtual void clear();
200 virtual bool readOptions(
const Options& options);
201 virtual void setDefaultOptions();
208 virtual boost::shared_ptr<BondOrderAssignment> computeNextSolution();
237 DPConfig_(std::vector<Valence>
const& v, std::vector<BondOrder>
const& bo);
247 template<
typename ValenceIterator,
typename BondIterator>
248 DPConfig_(ValenceIterator vit, ValenceIterator vend, BondIterator boit, BondIterator boend)
249 : consumed_valences(vit, vend),
250 bond_assignments(boit, boend)
257 bool operator < (
DPConfig_ const& conf)
const;
262 bool operator > (
DPConfig_ const& conf)
const;
267 bool operator <= (
DPConfig_ const& conf)
const;
272 bool operator >= (
DPConfig_ const& conf)
const;
277 bool operator == (
DPConfig_ const& conf)
const;
294 Size numberOfAtoms()
const;
299 Size numberOfBonds()
const;
341 typedef std::map<DPConfig_, Penalty>
DPMap_;
460 std::vector<MolecularGraphTraits::EdgeType>
bonds;
493 Penalty upper_bound = infinite_penalty);
523 boost::shared_ptr<TreeDecomposition>
ntd_;
563 std::vector<DPTable_*>::const_iterator begin, std::vector<DPTable_*>::const_iterator end);
641 std::vector<MolecularGraphTraits::EdgeType>& child_bonds,
Size forgotten_index);
676 boost::shared_ptr<TreeWidth<MolecularGraph> >
tw;
755 std::vector<BondOrder>
const& getBondOrders()
const;
844 bool operator() (
Edge const& e1,
Edge const& e2);
942 typedef std::pair<DPTable_::const_iterator, DPTable_::const_iterator>
DPPairIt_;
958 typedef std::multimap<DPConfig_ const*, Penalty, DPJoinMapComparator_>
DPJoinMap_;
997 std::vector<MolecularGraphTraits::EdgeType>
const&
bonds,
Penalty upperbound = infinite_penalty);
1033 bool hasMoreSolutions()
const;
1039 void nextSolution();
1045 Penalty penaltyOfNextSolution()
const;
1051 bags_->push_back(node);
1091 std::multiset<BackTrackingState_*, StateComparator_>
queue_;
1102 std::vector<MolecularGraphTraits::EdgeType>
const*
bonds_;
1107 boost::shared_ptr<std::vector<TreeDecompositionBag> >
bags_;
1197 bool isSolutionNeeded(
Penalty penalty);
1249 Size solution_number,
Penalty upper_bound = infinite_penalty);
1271 bool hasMoreSolutions()
const;
1277 void nextSolution();
1293 Penalty penaltyOfNextSolution()
const;
1312 std::priority_queue<Assignment_, std::vector<Assignment_>, std::greater<Assignment_> >
priority_queue_;
1344 std::pair<Size, Penalty> getNextMinimumBackTracker_()
const;
1351 void applyAssignment_(
Size backtracker_index,
Size solution_index);
1362 void combineEachSolution_(
Size mindex);
1367 std::vector<DPBackTracking_*> deepCopyOfBacktrackers_()
const;
1373 void initPenaltyData_();
1415 #endif // BALL_STRUCTURE_BONDORDERS_FPTBONDORDERSTRATEGY_H