HOG2
RubiksCubeEdges.h
Go to the documentation of this file.
1 //
2 // RubikEdge.h
3 // hog2 glut
4 //
5 // Created by Nathan Sturtevant on 1/4/13.
6 // Copyright (c) 2013 University of Denver. All rights reserved.
7 //
8 
9 #ifndef __hog2_glut__RubikEdge__
10 #define __hog2_glut__RubikEdge__
11 
12 #include <iostream>
13 #include <stdint.h>
14 #include <vector>
15 #include "SearchEnvironment.h"
16 #include "PDBHeuristic.h"
17 #include "MR1Permutation.h"
18 
20 {
21 public:
23  void Reset();
24  void Clear();
25  void GetDual(RubikEdgeStateBits &s) const;
26  int GetCubeInLoc(int whichLoc) const;
27  void SetCubeInLoc(int whichLoc, int cube);
28  bool GetCubeOrientation(int whichLoc) const;
29  void SetCubeOrientation(int whichLoc, bool flip);
30  void FlipCubeOrientation(int whichLoc);
31  // 60 bits
32  // 12 bits of flips
33  // 48 bits of pieces
34  uint64_t state;
35 };
36 
38 {
39 public:
41  void Reset();
42  void Clear();
43  void GetDual(RubikEdgeStateArray &s) const;
44  int GetCubeInLoc(int whichLoc) const;
45  void SetCubeInLoc(int whichLoc, int cube);
46  bool GetCubeOrientation(int whichLoc) const;
47  void SetCubeOrientation(int whichLoc, bool flip);
48  void FlipCubeOrientation(int whichLoc);
49  // 60 bits
50  // 12 bits of flips
51  // 48 bits of pieces
52  uint8_t state[24];
53 };
54 
55 //typedef RubikEdgeStateBits RubikEdgeState;
57 
59 
60 static bool operator==(const RubikEdgeStateBits &l1, const RubikEdgeStateBits &l2)
61 {
62  return l1.state == l2.state;
63 }
64 
65 static bool operator==(const RubikEdgeStateArray &l1, const RubikEdgeStateArray &l2)
66 {
67  for (int x = 0; x < 24; x++)
68  if (l1.state[x] != l2.state[x])
69  return false;
70  return true;
71 }
72 
73 
74 static std::ostream& operator <<(std::ostream & out, const RubikEdgeStateArray &s)
75 {
76  for (int x = 0; x < 12; x++)
77  {
78  out << s.GetCubeInLoc(x) << " [" << s.GetCubeOrientation(s.GetCubeInLoc(x)) << "] ";
79  }
80  return out;
81 }
82 
83 static std::ostream& operator <<(std::ostream & out, const RubikEdgeStateBits &s)
84 {
85  for (int x = 0; x < 12; x++)
86  {
87  out << s.GetCubeInLoc(x) << " [" << s.GetCubeOrientation(s.GetCubeInLoc(x)) << "] ";
88  }
89  return out;
90 }
91 
92 namespace std {
93  template <> struct hash<RubikEdgeStateBits>
94  {
95  size_t operator()(const RubikEdgeStateBits &s) const
96  {
97  return s.state;
98  }
99  };
100 
101  template <> struct hash<RubikEdgeStateArray>
102  {
103  size_t operator()(const RubikEdgeStateArray &s) const
104  {
105  size_t result = 0;
106  for (int x = 0; x < 12; x++)
107  result ^= (s.state[x])<<(x);
108  for (int x = 12; x < 24; x++)
109  result ^= (s.state[x])<<((x-12)*4+12);
110  return result;
111  }
112  };
113 }
114 
115 
116 typedef int RubikEdgeAction;
117 
119 public:
122  int length() { if (next == 0) return 1; return 1+next->length(); }
123 };
124 
125 class RubikEdge : public SearchEnvironment<RubikEdgeState, RubikEdgeAction>
126 {
127 public:
129  {
130  piecesToRank = 12;
131  for (int x = 0; x < 18; x++)
132  {
133  moves[x].act = x;
134  if (x != 17)
135  moves[x].next = &moves[x+1];
136  } moves[17].next = 0;
137  }
139  virtual void GetSuccessors(const RubikEdgeState &nodeID, std::vector<RubikEdgeState> &neighbors) const;
140  virtual void GetActions(const RubikEdgeState &nodeID, std::vector<RubikEdgeAction> &actions) const;
141  virtual RubikEdgeAction GetAction(const RubikEdgeState &s1, const RubikEdgeState &s2) const;
142  virtual void ApplyAction(RubikEdgeStateArray &s, RubikEdgeAction a) const;
143  virtual void UndoAction(RubikEdgeStateArray &s, RubikEdgeAction a) const;
144  virtual void ApplyAction(RubikEdgeStateBits &s, RubikEdgeAction a) const;
145  virtual void UndoAction(RubikEdgeStateBits &s, RubikEdgeAction a) const;
146 
147 
149  virtual double HCost(const RubikEdgeState &node1, const RubikEdgeState &node2) const { return 1; }
150  virtual double GCost(const RubikEdgeState &node1, const RubikEdgeState &node2) const { return 1; }
151  virtual double GCost(const RubikEdgeState &node, const RubikEdgeAction &act) const { return 1; }
152  virtual bool GoalTest(const RubikEdgeState &node, const RubikEdgeState &goal) const { return GoalTest(node); }
153  bool GoalTest(const RubikEdgeStateBits &) const;
154  bool GoalTest(const RubikEdgeStateArray &) const;
155 
158  void unrankPlayer(uint64_t d, RubikEdgeState & s, int who)
159  {
160  GetStateFromHash(d, s);
161  }
162  //
163  int64_t getMaxSinglePlayerRank() const;
164  int64_t getMaxSinglePlayerRank2();
165  int64_t getMaxSinglePlayerRank2(int64_t firstIndex);
166 
169  virtual void GetNextState(const RubikEdgeState &, RubikEdgeAction , RubikEdgeState &) const;
170 
171  virtual bool InvertAction(RubikEdgeAction &a) const;
172 
173  int64_t rankPlayer(RubikEdgeState &s, int who)
174  { return GetStateHash(s); }
175  void rankPlayerFirstTwo(const RubikEdgeState &s, int who, int64_t &rank);
176  void rankPlayerRemaining(const RubikEdgeState &s, int who, int64_t &rank);
177  void rankPlayer(const RubikEdgeState &s, int who, int64_t &index1, int64_t &index2)
178  { rankPlayerFirstTwo(s, 0, index1); rankPlayerRemaining(s, 0, index2); }
179 
180  virtual uint64_t GetStateHash(const RubikEdgeState &node) const;
181  virtual uint64_t GetActionHash(RubikEdgeAction act) const { return 0; }
182  virtual void GetStateFromHash(uint64_t hash, RubikEdgeState &node) const;
183 
184  virtual void OpenGLDraw() const;
185  virtual void OpenGLDraw(const RubikEdgeState&) const;
187  virtual void OpenGLDraw(const RubikEdgeState&, const RubikEdgeState&, float) const;
188  virtual void OpenGLDraw(const RubikEdgeState&, const RubikEdgeAction&) const;
189  void OpenGLDrawCube(const RubikEdgeState &s, int cube) const;
190  static void MRUnrank(int n, uint64_t r, uint64_t &perm);
191  static void MRUnrank2(int n, uint64_t r, uint64_t &perm);
192  static uint64_t MRRank(int n, uint64_t perm, uint64_t dual);
193  static uint64_t MRRank2(int n, uint64_t perm, uint64_t dual);
194 
195 private:
197 
198  void SetCubeColor(int which, bool face, const RubikEdgeState&) const;
200 };
201 
202 class RubikEdgePDB : public PDBHeuristic<RubikEdgeState, RubikEdgeAction, RubikEdge, RubikEdgeState, 4> {
203 public:
204  RubikEdgePDB(RubikEdge *e, const RubikEdgeState &s, std::vector<int> &distinctEdges);
205  static uint64_t GetStateSpaceSize();
206  static uint64_t GetStateHash(const RubikEdgeState &s);
207  static void GetStateFromHash(RubikEdgeState &s, uint64_t hash);
208  uint64_t GetPDBSize() const;
209  uint64_t GetPDBHash(const RubikEdgeState &s, int threadID = 0) const;
210  virtual uint64_t GetAbstractHash(const RubikEdgeState &s, int threadID = 0) const { return GetPDBHash(s); }
211  void GetStateFromPDBHash(uint64_t hash, RubikEdgeState &s, int threadID = 0) const;
213 
214  bool Load(const char *prefix);
215  void Save(const char *prefix);
216  bool Load(FILE *f);
217  void Save(FILE *f);
218  std::string GetFileName(const char *prefix);
219 private:
220  static uint64_t Factorial(int val);
221  static uint64_t FactorialUpperK(int n, int k);
222  std::vector<int> edges;
223  size_t puzzleSize;
224  uint64_t pdbSize;
226  // cache for computing ranking/unranking
227  mutable std::vector<std::vector<int> > puzzles;
228 // mutable std::vector<std::vector<int> > dual;
229 // mutable std::vector<std::vector<int> > locs;
230 };
231 
232 class RubikEdgeOrientationPDB : public PDBHeuristic<RubikEdgeState, RubikEdgeAction, RubikEdge, RubikEdgeState, 4> {
233 public:
235  static uint64_t GetStateSpaceSize();
236  static uint64_t GetStateHash(const RubikEdgeState &s);
237  static void GetStateFromHash(RubikEdgeState &s, uint64_t hash);
238  uint64_t GetPDBSize() const;
239  uint64_t GetPDBHash(const RubikEdgeState &s, int threadID = 0) const;
240  virtual uint64_t GetAbstractHash(const RubikEdgeState &s, int threadID = 0) const { return GetPDBHash(s); }
241  void GetStateFromPDBHash(uint64_t hash, RubikEdgeState &s, int threadID = 0) const;
243 
244  bool Load(const char *prefix);
245  void Save(const char *prefix);
246  bool Load(FILE *f);
247  void Save(FILE *f);
248  std::string GetFileName(const char *prefix);
249 };
250 
251 
252 #endif /* defined(__hog2_glut__RubikEdge__) */
RubikEdgePDB::GetStateFromPDBHash
void GetStateFromPDBHash(uint64_t hash, RubikEdgeState &s, int threadID=0) const
Definition: RubiksCubeEdges.cpp:1398
RubikEdgeOrientationPDB::GetPDBSize
uint64_t GetPDBSize() const
Definition: RubiksCubeEdges.cpp:1655
RubikEdge::RubikEdge
RubikEdge()
Definition: RubiksCubeEdges.h:128
RubikEdgePDB::mr1
MR1KPermutation mr1
Definition: RubiksCubeEdges.h:225
RubikEdgeStateBits::GetCubeInLoc
int GetCubeInLoc(int whichLoc) const
Definition: RubiksCubeEdges.cpp:76
RubikEdgeOrientationPDB::GetStateFromHash
static void GetStateFromHash(RubikEdgeState &s, uint64_t hash)
Definition: RubiksCubeEdges.cpp:1635
std::hash< RubikEdgeStateArray >::operator()
size_t operator()(const RubikEdgeStateArray &s) const
Definition: RubiksCubeEdges.h:103
RubikEdgeOrientationPDB
Definition: RubiksCubeEdges.h:232
RubikEdgeAction
int RubikEdgeAction
Definition: RubiksCubeEdges.h:116
RubikEdgePDB::GetStateFromAbstractState
RubikEdgeState GetStateFromAbstractState(RubikEdgeState &s) const
Definition: RubiksCubeEdges.h:212
RubikEdgePDB::GetFileName
std::string GetFileName(const char *prefix)
Definition: RubiksCubeEdges.cpp:1537
RubikEdge::InvertAction
virtual bool InvertAction(RubikEdgeAction &a) const
Definition: RubiksCubeEdges.cpp:533
RubikEdge::UndoAction
virtual void UndoAction(RubikEdgeStateArray &s, RubikEdgeAction a) const
Definition: RubiksCubeEdges.cpp:244
RubikEdgePDB::GetStateHash
static uint64_t GetStateHash(const RubikEdgeState &s)
Definition: RubiksCubeEdges.cpp:1276
RubikEdgeStateArray::state
uint8_t state[24]
Definition: RubiksCubeEdges.h:52
RubikEdgeStateArray::Clear
void Clear()
Definition: RubiksCubeEdges.cpp:132
d
mcData d[]
Definition: MotionCaptureMovement.cpp:21
RubikEdgeStateArray::FlipCubeOrientation
void FlipCubeOrientation(int whichLoc)
Definition: RubiksCubeEdges.cpp:167
RubikEdge::moves
RubikEdgeMove moves[18]
Definition: RubiksCubeEdges.h:199
RubikEdgePDB::Load
bool Load(const char *prefix)
Definition: RubiksCubeEdges.cpp:1483
RubikEdge::OpenGLDraw
virtual void OpenGLDraw() const
Definition: RubiksCubeEdges.cpp:834
RubikEdge::getMoves
RubikEdgeMove * getMoves(RubikEdgeState &)
Definition: RubiksCubeEdges.h:167
RubikEdgeOrientationPDB::GetStateHash
static uint64_t GetStateHash(const RubikEdgeState &s)
Definition: RubiksCubeEdges.cpp:1625
RubikEdgeOrientationPDB::GetStateFromPDBHash
void GetStateFromPDBHash(uint64_t hash, RubikEdgeState &s, int threadID=0) const
Definition: RubiksCubeEdges.cpp:1665
RubikEdgeOrientationPDB::GetFileName
std::string GetFileName(const char *prefix)
Definition: RubiksCubeEdges.cpp:1709
RubikEdgeMove
Definition: RubiksCubeEdges.h:118
RubikEdgeStateBits::RubikEdgeStateBits
RubikEdgeStateBits()
Definition: RubiksCubeEdges.cpp:62
RubikEdge::freeMove
void freeMove(RubikEdgeMove *m)
Definition: RubiksCubeEdges.h:168
RotateRubikEdgeClockwise
RubikEdgeState RotateRubikEdgeClockwise(const RubikEdgeState &in, int step)
Implementation details:
Definition: RubiksCubeEdges.cpp:43
RubikEdgeStateArray::SetCubeInLoc
void SetCubeInLoc(int whichLoc, int cube)
Definition: RubiksCubeEdges.cpp:141
RubikEdge::MRUnrank
static void MRUnrank(int n, uint64_t r, uint64_t &perm)
Definition: RubiksCubeEdges.cpp:747
RubikEdgeStateBits::FlipCubeOrientation
void FlipCubeOrientation(int whichLoc)
Definition: RubiksCubeEdges.cpp:103
RubikEdge::HCost
virtual double HCost(const RubikEdgeState &node1, const RubikEdgeState &node2) const
Heuristic value between two arbitrary nodes.
Definition: RubiksCubeEdges.h:149
RubikEdge::rankPlayerFirstTwo
void rankPlayerFirstTwo(const RubikEdgeState &s, int who, int64_t &rank)
Definition: RubiksCubeEdges.cpp:619
RubikEdge::GetNextState
virtual void GetNextState(const RubikEdgeState &, RubikEdgeAction, RubikEdgeState &) const
Definition: RubiksCubeEdges.cpp:527
RubikEdge::GoalTest
virtual bool GoalTest(const RubikEdgeState &node, const RubikEdgeState &goal) const
Definition: RubiksCubeEdges.h:152
RubikEdge::MRRank
static uint64_t MRRank(int n, uint64_t perm, uint64_t dual)
Definition: RubiksCubeEdges.cpp:668
RubikEdgePDB
Definition: RubiksCubeEdges.h:202
RubikEdgeStateArray::Reset
void Reset()
Definition: RubiksCubeEdges.cpp:124
RubikEdgePDB::Factorial
static uint64_t Factorial(int val)
Definition: RubiksCubeEdges.cpp:1570
RubikEdgePDB::edges
std::vector< int > edges
Definition: RubiksCubeEdges.h:222
RubikEdge
Definition: RubiksCubeEdges.h:125
RubikEdgePDB::puzzleSize
size_t puzzleSize
Definition: RubiksCubeEdges.h:223
RubikEdgeStateArray::GetCubeInLoc
int GetCubeInLoc(int whichLoc) const
Definition: RubiksCubeEdges.cpp:136
RubikEdgeStateBits::GetDual
void GetDual(RubikEdgeStateBits &s) const
Definition: RubiksCubeEdges.cpp:110
RubikEdgeOrientationPDB::GetStateFromAbstractState
RubikEdgeState GetStateFromAbstractState(RubikEdgeState &s) const
Definition: RubiksCubeEdges.h:242
RubikEdgeStateBits::SetCubeInLoc
void SetCubeInLoc(int whichLoc, int cube)
Definition: RubiksCubeEdges.cpp:80
RubikEdge::rankPlayerRemaining
void rankPlayerRemaining(const RubikEdgeState &s, int who, int64_t &rank)
Definition: RubiksCubeEdges.cpp:628
PDBHeuristic
Definition: PDBHeuristic.h:39
RubikEdgeStateBits::SetCubeOrientation
void SetCubeOrientation(int whichLoc, bool flip)
Definition: RubiksCubeEdges.cpp:93
RubikEdgeOrientationPDB::GetPDBHash
uint64_t GetPDBHash(const RubikEdgeState &s, int threadID=0) const
Definition: RubiksCubeEdges.cpp:1660
RubikEdgeStateArray::RubikEdgeStateArray
RubikEdgeStateArray()
Definition: RubiksCubeEdges.cpp:120
RubikEdge::getMaxSinglePlayerRank
int64_t getMaxSinglePlayerRank() const
Definition: RubiksCubeEdges.cpp:598
RubikEdge::piecesToRank
int piecesToRank
Definition: RubiksCubeEdges.h:196
RubikEdge::OpenGLDrawCube
void OpenGLDrawCube(const RubikEdgeState &s, int cube) const
Definition: RubiksCubeEdges.cpp:866
RubikEdge::unrankPlayer
void unrankPlayer(uint64_t d, RubikEdgeState &s, int who)
Definition: RubiksCubeEdges.h:158
MR1KPermutation
Definition: MR1Permutation.h:16
RubikEdge::rankPlayer
int64_t rankPlayer(RubikEdgeState &s, int who)
Definition: RubiksCubeEdges.h:173
RubikEdge::ApplyAction
virtual void ApplyAction(RubikEdgeStateArray &s, RubikEdgeAction a) const
Definition: RubiksCubeEdges.cpp:516
RubikEdge::MRUnrank2
static void MRUnrank2(int n, uint64_t r, uint64_t &perm)
Definition: RubiksCubeEdges.cpp:758
operator<<
static std::ostream & operator<<(std::ostream &out, const RubikEdgeStateArray &s)
Definition: RubiksCubeEdges.h:74
RubikEdgeOrientationPDB::GetStateSpaceSize
static uint64_t GetStateSpaceSize()
Definition: RubiksCubeEdges.cpp:1619
RubikEdge::GetSuccessors
virtual void GetSuccessors(const RubikEdgeState &nodeID, std::vector< RubikEdgeState > &neighbors) const
Definition: RubiksCubeEdges.cpp:185
std::hash< RubikEdgeStateBits >::operator()
size_t operator()(const RubikEdgeStateBits &s) const
Definition: RubiksCubeEdges.h:95
RubikEdge::MRRank2
static uint64_t MRRank2(int n, uint64_t perm, uint64_t dual)
Definition: RubiksCubeEdges.cpp:705
RubikEdgeMove::act
RubikEdgeAction act
Definition: RubiksCubeEdges.h:120
RubikEdgeStateArray
Definition: RubiksCubeEdges.h:37
RubikEdge::GetAction
virtual RubikEdgeAction GetAction(const RubikEdgeState &s1, const RubikEdgeState &s2) const
Definition: RubiksCubeEdges.cpp:204
RubikEdgeMove::next
RubikEdgeMove * next
Definition: RubiksCubeEdges.h:121
RubikEdge::SetCubeColor
void SetCubeColor(int which, bool face, const RubikEdgeState &) const
Definition: RubiksCubeEdges.cpp:1225
RubikEdgeStateBits::GetCubeOrientation
bool GetCubeOrientation(int whichLoc) const
Definition: RubiksCubeEdges.cpp:89
RubikEdge::rankPlayer
void rankPlayer(const RubikEdgeState &s, int who, int64_t &index1, int64_t &index2)
Definition: RubiksCubeEdges.h:177
RubikEdge::~RubikEdge
~RubikEdge()
Definition: RubiksCubeEdges.h:138
RubikEdge::ApplyMove
void ApplyMove(RubikEdgeState &s, RubikEdgeMove *a)
Definition: RubiksCubeEdges.cpp:211
RubikEdgeStateArray::SetCubeOrientation
void SetCubeOrientation(int whichLoc, bool flip)
Definition: RubiksCubeEdges.cpp:156
RubikEdge::getMaxSinglePlayerRank2
int64_t getMaxSinglePlayerRank2()
Definition: RubiksCubeEdges.cpp:609
RubikEdgeStateBits::Reset
void Reset()
Definition: RubiksCubeEdges.cpp:66
RubikEdgePDB::RubikEdgePDB
RubikEdgePDB(RubikEdge *e, const RubikEdgeState &s, std::vector< int > &distinctEdges)
Definition: RubiksCubeEdges.cpp:1262
RubikEdgePDB::puzzles
std::vector< std::vector< int > > puzzles
Definition: RubiksCubeEdges.h:227
RubikEdgePDB::GetStateFromHash
static void GetStateFromHash(RubikEdgeState &s, uint64_t hash)
Definition: RubiksCubeEdges.cpp:1295
RubikEdgeStateBits::Clear
void Clear()
Definition: RubiksCubeEdges.cpp:72
RubikEdgeOrientationPDB::GetAbstractHash
virtual uint64_t GetAbstractHash(const RubikEdgeState &s, int threadID=0) const
Definition: RubiksCubeEdges.h:240
std
Definition: CanonicalGraphEnvironment.h:26
RubikEdgeState
RubikEdgeStateArray RubikEdgeState
Definition: RubiksCubeEdges.h:56
RubikEdgePDB::FactorialUpperK
static uint64_t FactorialUpperK(int n, int k)
Definition: RubiksCubeEdges.cpp:1581
RubikEdgePDB::GetStateSpaceSize
static uint64_t GetStateSpaceSize()
Definition: RubiksCubeEdges.cpp:1270
RubikEdge::GetActions
virtual void GetActions(const RubikEdgeState &nodeID, std::vector< RubikEdgeAction > &actions) const
Definition: RubiksCubeEdges.cpp:195
RubikEdge::GCost
virtual double GCost(const RubikEdgeState &node, const RubikEdgeAction &act) const
Definition: RubiksCubeEdges.h:151
RubikEdgeStateArray::GetCubeOrientation
bool GetCubeOrientation(int whichLoc) const
Definition: RubiksCubeEdges.cpp:151
RubikEdgePDB::GetPDBSize
uint64_t GetPDBSize() const
Definition: RubiksCubeEdges.cpp:1326
MR1Permutation.h
RubikEdgeOrientationPDB::RubikEdgeOrientationPDB
RubikEdgeOrientationPDB(RubikEdge *e, const RubikEdgeState &s)
Definition: RubiksCubeEdges.cpp:1613
RubikEdgeStateBits
Definition: RubiksCubeEdges.h:19
RubikEdge::UndoMove
void UndoMove(RubikEdgeState &s, RubikEdgeMove *a)
Definition: RubiksCubeEdges.cpp:216
PDBHeuristic.h
RubikEdge::GetStateHash
virtual uint64_t GetStateHash(const RubikEdgeState &node) const
Definition: RubiksCubeEdges.cpp:647
RubikEdgeMove::length
int length()
Definition: RubiksCubeEdges.h:122
RubikEdgeOrientationPDB::Save
void Save(const char *prefix)
Definition: RubiksCubeEdges.cpp:1683
RubikEdgePDB::GetPDBHash
uint64_t GetPDBHash(const RubikEdgeState &s, int threadID=0) const
Definition: RubiksCubeEdges.cpp:1337
RubikEdgePDB::pdbSize
uint64_t pdbSize
Definition: RubiksCubeEdges.h:224
operator==
static bool operator==(const RubikEdgeStateBits &l1, const RubikEdgeStateBits &l2)
Definition: RubiksCubeEdges.h:60
RubikEdgeOrientationPDB::Load
bool Load(const char *prefix)
Definition: RubiksCubeEdges.cpp:1670
RubikEdgeStateBits::state
uint64_t state
Definition: RubiksCubeEdges.h:34
SearchEnvironment
Definition: SearchEnvironment.h:30
RubikEdge::GCost
virtual double GCost(const RubikEdgeState &node1, const RubikEdgeState &node2) const
Definition: RubiksCubeEdges.h:150
RubikEdgeStateArray::GetDual
void GetDual(RubikEdgeStateArray &s) const
Definition: RubiksCubeEdges.cpp:175
RubikEdge::GetActionHash
virtual uint64_t GetActionHash(RubikEdgeAction act) const
Definition: RubiksCubeEdges.h:181
node
Nodes to be stored within a Graph.
Definition: Graph.h:170
SearchEnvironment.h
RubikEdge::GetStateFromHash
virtual void GetStateFromHash(uint64_t hash, RubikEdgeState &node) const
Definition: RubiksCubeEdges.cpp:715
RubikEdgePDB::Save
void Save(const char *prefix)
Definition: RubiksCubeEdges.cpp:1496
RubikEdgePDB::GetAbstractHash
virtual uint64_t GetAbstractHash(const RubikEdgeState &s, int threadID=0) const
Definition: RubiksCubeEdges.h:210