Debian Codegraph @

include/BALL/STRUCTURE/BONDORDERS/AStarBondOrderStrategy.h

raw symbols SCIP
1 #ifndef BALL_STRUCTURE_BONDORDERS_ASTARBONDORDERSTRATEGY_H
2 #define BALL_STRUCTURE_BONDORDERS_ASTARBONDORDERSTRATEGY_H
3
4 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENTSTRATEGY_H
5 # include <BALL/STRUCTURE/BONDORDERS/bondOrderAssignmentStrategy.h>
6 #endif
7
8 #ifndef BALL_STRUCTURE_BONDORDERS_PARTIALBONDORDERASSIGNMENT_H
9 # include <BALL/STRUCTURE/BONDORDERS/partialBondOrderAssignment.h>
10 #endif
11
12 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENT_H
13 # include <BALL/STRUCTURE/BONDORDERS/bondOrderAssignment.h>
14 #endif
15
16 #ifndef BALL_DATATYPE_HASHMAP_H
17 # include <BALL/DATATYPE/hashMap.h>
18 #endif
19
20 #include <queue>
21
22 namespace BALL
23 {
24 /** AStar algorithm for bond order assignment.
25 *
26 * This class implements an AStar approach for the bond order assignment
27 * problem that can be used by the \link AssignBondOrderProcessor
28 * AssignBondOrderProcessor \endlink.
29 */
30 class AStarBondOrderStrategy
31 : public BondOrderAssignmentStrategy
32 {
33 public:
34 /** @name Constant Definitions
35 */
36 //@{
37 /// Option names
38 struct BALL_EXPORT Option
39 {
40 /** heuristic defining the tightness of the search critria
41 * @see Option::Heuristic::SIMPLE
42 * @see Option::Heuristic::MEDIUM
43 * @see Option::Heuristic::TIGHT
44 */
45 static const char* HEURISTIC;
46 };
47
48 struct BALL_EXPORT Default
49 {
50 static const String HEURISTIC;
51 };
52
53 struct BALL_EXPORT Heuristic
54 {
55 static const String SIMPLE;
56 static const String MEDIUM;
57 static const String TIGHT;
58 };
59 //@}
60
61 AStarBondOrderStrategy(AssignBondOrderProcessor* parent);
62
63 virtual ~AStarBondOrderStrategy();
64
65 virtual void clear();
66 virtual void init();
67
68 virtual bool readOptions(const Options& options);
69 virtual void setDefaultOptions();
70
71 virtual boost::shared_ptr<BondOrderAssignment> computeNextSolution();
72
73 protected:
74
75
76
77 /// The chosen heuristic
78 PartialBondOrderAssignment::HEURISTIC_INDEX heuristic_index_;
79
80 std::priority_queue<PartialBondOrderAssignment> queue_;
81
82 /// The priority queue.
83 // The current number of node expansions.
84 // step_ + queue_.size() gives the number of touched nodes.
85 int step_;
86 };
87
88 }
89 #endif // BALL_STRUCTURE_BONDORDERS_ASTARBONDORDERSTRATEGY_H