| 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 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
class AStarBondOrderStrategy |
| 31 |
: public BondOrderAssignmentStrategy |
| 32 |
{ |
| 33 |
public: |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
struct BALL_EXPORT Option |
| 39 |
{ |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 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 |
|
| 78 |
PartialBondOrderAssignment::HEURISTIC_INDEX heuristic_index_; |
| 79 |
|
| 80 |
std::priority_queue<PartialBondOrderAssignment> queue_; |
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
int step_; |
| 86 |
}; |
| 87 |
|
| 88 |
} |
| 89 |
#endif |