#pragma once #include #include #include #include "AStarBase.h" class AStar { public: AStar(void); ~AStar(void); std::vector Solve(AStarBase* initState); private: // Comparison structure. struct Cmp : public std::binary_function { bool operator()(AStarBase* a1, AStarBase* a2) const { return (a1->_totalEstimatedCost >= a2->_totalEstimatedCost); } }; std::priority_queue, Cmp > _openList; std::map _closedList; AStarBase* Search(void); std::vector GetSolutionSequence(AStarBase* node); std::vector _solution; };