You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cpp/stlastar.h
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,7 @@ given where due.
33
33
34
34
// stl includes
35
35
#include<algorithm>
36
-
#include<set>
37
36
#include<unordered_set>
38
-
// #include <boost/functional/hash.hpp>
39
37
#include<vector>
40
38
#include<cfloat>
41
39
@@ -777,7 +775,7 @@ template <class UserState> class AStarSearch
777
775
// Heap (simple vector but used as a heap, cf. Steve Rabin's game gems article)
778
776
vector< Node *> m_OpenList;
779
777
780
-
// Closed list is a set
778
+
// Closed is an unordered_set
781
779
structNodeHash {
782
780
size_toperator() (Node* const& n) const {
783
781
return n->m_UserState.Hash();
@@ -833,7 +831,7 @@ template <class T> class AStarState
833
831
virtualboolGetSuccessors( AStarSearch<T> *astarsearch, T *parent_node ) = 0; // Retrieves all successors to this node and adds them via astarsearch.addSuccessor()
834
832
virtualfloatGetCost( T &successor ) = 0; // Computes the cost of travelling from this node to the successor node
835
833
virtualboolIsSameState( T &rhs ) = 0; // Returns true if this node is the same as the rhs node
836
-
virtualfloatHash() = 0;
834
+
virtualstd::size_tHash() = 0;// Returns a hash for the state
0 commit comments