1 #ifndef BALL_STRUCTURE_BONDORDERS_FPTBONDORDERSTRATEGY_H
2 #define BALL_STRUCTURE_BONDORDERS_FPTBONDORDERSTRATEGY_H
4 #ifndef BALL_COMMON_GLOBAL_H
8 #ifndef BALL_COMMON_LIMITS_H
12 #ifndef BALL_MATHS_COMMON_H
16 #ifndef BALL_KERNEL_ATOMCONTAINER_H
20 #ifndef BALL_KERNEL_BOND_H
24 #ifndef BALL_DATATYPE_HASHMAP_H
28 #ifndef BALL_DATATYPE_GRAPH_H
32 #ifndef BALL_DATATYPE_GRAPH_GRAPHALGORITHMS_H
36 #ifndef BALL_DATATYPE_GRAPH_TREEWIDTH_H
40 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENTSTRATEGY_H
44 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENT_H
56 #include <boost/shared_ptr.hpp>
57 #include <boost/ref.hpp>
195 virtual void clear();
204 virtual bool readOptions(
const Options& options);
205 virtual void setDefaultOptions();
212 virtual boost::shared_ptr<BondOrderAssignment> computeNextSolution();
241 DPConfig_(std::vector<Valence>
const& v, std::vector<BondOrder>
const& bo);
251 template<
typename ValenceIterator,
typename BondIterator>
252 DPConfig_(ValenceIterator vit, ValenceIterator vend, BondIterator boit, BondIterator boend)
253 : consumed_valences(vit, vend),
254 bond_assignments(boit, boend)
261 bool operator < (
DPConfig_ const& conf)
const;
266 bool operator > (
DPConfig_ const& conf)
const;
271 bool operator <= (
DPConfig_ const& conf)
const;
276 bool operator >= (
DPConfig_ const& conf)
const;
281 bool operator == (
DPConfig_ const& conf)
const;
298 Size numberOfAtoms()
const;
303 Size numberOfBonds()
const;
345 typedef std::map<DPConfig_, Penalty>
DPMap_;
464 std::vector<MolecularGraphTraits::EdgeType>
bonds;
497 Penalty upper_bound = infinite_penalty);
527 boost::shared_ptr<TreeDecomposition>
ntd_;
567 std::vector<DPTable_*>::const_iterator begin, std::vector<DPTable_*>::const_iterator end);
645 std::vector<MolecularGraphTraits::EdgeType>& child_bonds,
Size forgotten_index);
680 boost::shared_ptr<TreeWidth<MolecularGraph> >
tw;
759 std::vector<BondOrder>
const& getBondOrders()
const;
848 bool operator() (
Edge const& e1,
Edge const& e2);
946 typedef std::pair<DPTable_::const_iterator, DPTable_::const_iterator>
DPPairIt_;
962 typedef std::multimap<DPConfig_ const*, Penalty, DPJoinMapComparator_>
DPJoinMap_;
1001 std::vector<MolecularGraphTraits::EdgeType>
const&
bonds,
Penalty upperbound = infinite_penalty);
1037 bool hasMoreSolutions()
const;
1043 void nextSolution();
1049 Penalty penaltyOfNextSolution()
const;
1055 bags_->push_back(node);
1095 std::multiset<BackTrackingState_*, StateComparator_>
queue_;
1106 std::vector<MolecularGraphTraits::EdgeType>
const*
bonds_;
1111 boost::shared_ptr<std::vector<TreeDecompositionBag> >
bags_;
1201 bool isSolutionNeeded(
Penalty penalty);
1253 Size solution_number,
Penalty upper_bound = infinite_penalty);
1275 bool hasMoreSolutions()
const;
1281 void nextSolution();
1297 Penalty penaltyOfNextSolution()
const;
1316 std::priority_queue<Assignment_, std::vector<Assignment_>, std::greater<Assignment_> >
priority_queue_;
1348 std::pair<Size, Penalty> getNextMinimumBackTracker_()
const;
1355 void applyAssignment_(
Size backtracker_index,
Size solution_index);
1366 void combineEachSolution_(
Size mindex);
1371 std::vector<DPBackTracking_*> deepCopyOfBacktrackers_()
const;
1377 void initPenaltyData_();
1419 #endif // BALL_STRUCTURE_BONDORDERS_FPTBONDORDERSTRATEGY_H