BALL
1.4.1
|
00001 #ifndef BALL_STRUCTURE_BONDORDERS_ASTARBONDORDERSTRATEGY_H 00002 #define BALL_STRUCTURE_BONDORDERS_ASTARBONDORDERSTRATEGY_H 00003 00004 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENTSTRATEGY_H 00005 # include <BALL/STRUCTURE/BONDORDERS/bondOrderAssignmentStrategy.h> 00006 #endif 00007 00008 #ifndef BALL_STRUCTURE_BONDORDERS_PARTIALBONDORDERASSIGNMENT_H 00009 # include <BALL/STRUCTURE/BONDORDERS/partialBondOrderAssignment.h> 00010 #endif 00011 00012 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENT_H 00013 # include <BALL/STRUCTURE/BONDORDERS/bondOrderAssignment.h> 00014 #endif 00015 00016 #ifndef BALL_DATATYPE_HASHMAP_H 00017 # include <BALL/DATATYPE/hashMap.h> 00018 #endif 00019 00020 #include <queue> 00021 00022 namespace BALL 00023 { 00030 class AStarBondOrderStrategy 00031 : public BondOrderAssignmentStrategy 00032 { 00033 public: 00037 00038 struct BALL_EXPORT Option 00039 { 00045 static const char* HEURISTIC; 00046 }; 00047 00048 struct BALL_EXPORT Default 00049 { 00050 static const String HEURISTIC; 00051 }; 00052 00053 struct BALL_EXPORT Heuristic 00054 { 00055 static const String SIMPLE; 00056 static const String MEDIUM; 00057 static const String TIGHT; 00058 }; 00060 00061 AStarBondOrderStrategy(AssignBondOrderProcessor* parent); 00062 00063 virtual ~AStarBondOrderStrategy(); 00064 00065 virtual void clear(); 00066 virtual void init(); 00067 00068 virtual bool readOptions(const Options& options); 00069 virtual void setDefaultOptions(); 00070 00071 virtual boost::shared_ptr<BondOrderAssignment> computeNextSolution(); 00072 00073 protected: 00074 00075 00076 00078 PartialBondOrderAssignment::HEURISTIC_INDEX heuristic_index_; 00079 00080 std::priority_queue<PartialBondOrderAssignment> queue_; 00081 00083 // The current number of node expansions. 00084 // step_ + queue_.size() gives the number of touched nodes. 00085 int step_; 00086 }; 00087 00088 } 00089 #endif // BALL_STRUCTURE_BONDORDERS_ASTARBONDORDERSTRATEGY_H