HOG2
|
#include <RC.h>
Public Member Functions | |
RCPDB (RC *e, const std::array< bool, 12 > &edgeRotations, const std::array< bool, 12 > &edgeLocations, const std::array< bool, 8 > &cornerRotations, const std::array< bool, 8 > &cornerLocations) | |
uint64_t | GetStateHash (const RCState &s) const |
void | GetStateFromHash (RCState &s, uint64_t hash) const |
uint64_t | GetPDBSize () const |
uint64_t | GetPDBHash (const RCState &s, int threadID=0) const |
uint64_t | GetAbstractHash (const RCState &s, int threadID=0) const |
void | GetStateFromPDBHash (uint64_t hash, RCState &s, int threadID=0) const |
RCState | GetStateFromAbstractState (RCState &s) const |
void | OpenGLDraw () const |
bool | Load (const char *prefix) |
void | Save (const char *prefix) |
bool | Load (FILE *f) |
void | Save (FILE *f) |
std::string | GetFileName (const char *prefix) |
Public Member Functions inherited from PDBHeuristic< RCState, RCAction, RC, RCState, 4 > | |
PDBHeuristic (RC *e) | |
virtual | ~PDBHeuristic () |
void | SetGoal (const RCState &goal) |
void | SetGoal (const std::vector< RCState > &goals) |
virtual double | HCost (const RCState &a, const RCState &b) const |
virtual uint64_t | GetPDBSize () const=0 |
void | ShuffleValues () |
This methods randomizes the entries in the PDB. More... | |
void | BuildPDB (const RCState &goal) |
void | BuildPDB (const RCState &goal, int numThreads) |
void | BuildPDBForward (const RCState &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false) |
void | BuildPDBForward (const std::vector< RCState > &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false) |
void | BuildPDBBackward (const RCState &goal, int numThreads) |
void | BuildPDBForwardBackward (const RCState &goal, int numThreads) |
void | BuildAdditivePDB (const RCState &goal, int numThreads, bool useCourseOpen=true) |
void | DivCompress (int factor, bool print_histogram) |
void | ModCompress (int factor, bool print_histogram) |
void | ModCompress (uint64_t newEntries, bool print_histogram) |
void | ZeroLowValues (int limit) |
void | DeltaCompress (Heuristic< RCState > *h, RCState goal, bool print_histogram) |
void | FractionalDivCompress (uint64_t count, bool print_histogram) |
void | FractionalModCompress (uint64_t factor, bool print_histogram) |
void | ValueCompress (int maxValue, bool print_histogram) |
void | ValueCompress (std::vector< int > cutoffs, bool print_histogram) |
void | ValueRangeCompress (int numBits, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RCState, RCAction, RC, RCState, 5 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RCState, RCAction, RC, RCState, 4 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RCState, RCAction, RC, RCState, 3 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RCState, RCAction, RC, RCState, 2 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< RCState, RCAction, RC, RCState, 1 > *, bool print_histogram) |
void | CustomValueRangeCompress (std::vector< uint64_t > dist, int numBits, bool print_histogram) |
double | PrintHistogram () |
double | GetAverageValue () |
void | GetHistogram (std::vector< uint64_t > &histogram) |
Public Member Functions inherited from Heuristic< RCState > | |
Heuristic () | |
virtual | ~Heuristic () |
Private Member Functions | |
uint64_t | FactorialUpperK (int n, int k) const |
uint64_t | GetEdgeRotationSize () const |
uint64_t | GetEdgeLocationSize () const |
uint64_t | GetCornerRotationSize () const |
uint64_t | GetCornerLocationSize () const |
uint64_t | GetEdgeRotationHash (const RCState &s) const |
uint64_t | GetEdgeLocationHash (const RCState &s) const |
uint64_t | GetCornerRotationHash (const RCState &s) const |
uint64_t | GetCornerLocationHash (const RCState &s) const |
void | GetStateFromEdgeRotationHash (RCState &s, uint64_t hash) const |
void | GetStateFromEdgeLocationHash (RCState &s, uint64_t hash) const |
void | GetStateFromCornerRotationHash (RCState &s, uint64_t hash) const |
void | GetStateFromCornerLocationHash (RCState &s, uint64_t hash) const |
Private Attributes | |
std::vector< int > | edgeRotations |
std::vector< int > | edgeLocations |
std::vector< int > | cornerRotations |
std::vector< int > | cornerLocations |
Additional Inherited Members | |
Public Attributes inherited from PDBHeuristic< RCState, RCAction, RC, RCState, 4 > | |
NBitArray< pdbBits > | PDB |
int | vrcValues [1<< pdbBits] |
PDBLookupType | type |
uint64_t | compressionValue |
RC * | env |
std::vector< RCState > | goalState |
Public Attributes inherited from Heuristic< RCState > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
RCPDB::RCPDB | ( | RC * | e, |
const std::array< bool, 12 > & | edgeRotations, | ||
const std::array< bool, 12 > & | edgeLocations, | ||
const std::array< bool, 8 > & | cornerRotations, | ||
const std::array< bool, 8 > & | cornerLocations | ||
) |
Definition at line 1760 of file RC.cpp.
References cornerLocations, cornerRotations, edgeLocations, and edgeRotations.
|
private |
Definition at line 2095 of file RC.cpp.
Referenced by GetCornerLocationHash(), GetCornerLocationSize(), GetEdgeLocationHash(), GetEdgeLocationSize(), GetStateFromCornerLocationHash(), and GetStateFromEdgeLocationHash().
|
inlinevirtual |
Implements PDBHeuristic< RCState, RCAction, RC, RCState, 4 >.
Definition at line 458 of file RC.h.
References GetPDBHash().
|
private |
Definition at line 1942 of file RC.cpp.
References cornerLocations, FactorialUpperK(), and RCState::indices.
Referenced by GetPDBHash().
|
private |
Definition at line 1883 of file RC.cpp.
References cornerLocations, and FactorialUpperK().
Referenced by GetPDBHash(), GetPDBSize(), and GetStateFromPDBHash().
|
private |
Definition at line 1930 of file RC.cpp.
References cornerRotations, min(), and RCState::rotation.
Referenced by GetPDBHash().
|
private |
Definition at line 1876 of file RC.cpp.
References cornerRotations, and min().
Referenced by GetPDBHash(), GetPDBSize(), and GetStateFromPDBHash().
|
private |
Definition at line 1900 of file RC.cpp.
References edgeLocations, FactorialUpperK(), and RCState::indices.
Referenced by GetPDBHash().
|
private |
Definition at line 1871 of file RC.cpp.
References edgeLocations, and FactorialUpperK().
Referenced by GetPDBSize().
|
private |
Definition at line 1888 of file RC.cpp.
References edgeRotations, min(), and RCState::rotation.
Referenced by GetPDBHash().
|
private |
Definition at line 1865 of file RC.cpp.
References edgeRotations, and min().
Referenced by GetPDBHash(), GetPDBSize(), and GetStateFromPDBHash().
|
inlinevirtual |
|
virtual |
Implements PDBHeuristic< RCState, RCAction, RC, RCState, 4 >.
Definition at line 1797 of file RC.cpp.
References GetCornerLocationHash(), GetCornerLocationSize(), GetCornerRotationHash(), GetCornerRotationSize(), GetEdgeLocationHash(), GetEdgeRotationHash(), and GetEdgeRotationSize().
Referenced by GetAbstractHash().
uint64_t RCPDB::GetPDBSize | ( | ) | const |
Definition at line 1791 of file RC.cpp.
References GetCornerLocationSize(), GetCornerRotationSize(), GetEdgeLocationSize(), and GetEdgeRotationSize().
|
private |
Definition at line 2058 of file RC.cpp.
References cornerLocations, FactorialUpperK(), and RCState::indices.
Referenced by GetStateFromPDBHash().
|
private |
Definition at line 2035 of file RC.cpp.
References cornerRotations, min(), and RCState::rotation.
Referenced by GetStateFromPDBHash().
|
private |
Definition at line 1998 of file RC.cpp.
References edgeLocations, FactorialUpperK(), and RCState::indices.
Referenced by GetStateFromPDBHash().
|
private |
Definition at line 1973 of file RC.cpp.
References edgeRotations, min(), and RCState::rotation.
Referenced by GetStateFromPDBHash().
void RCPDB::GetStateFromHash | ( | RCState & | s, |
uint64_t | hash | ||
) | const |
|
virtual |
Implements PDBHeuristic< RCState, RCAction, RC, RCState, 4 >.
Definition at line 1822 of file RC.cpp.
References GetCornerLocationSize(), GetCornerRotationSize(), GetEdgeRotationSize(), GetStateFromCornerLocationHash(), GetStateFromCornerRotationHash(), GetStateFromEdgeLocationHash(), and GetStateFromEdgeRotationHash().
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from PDBHeuristic< RCState, RCAction, RC, RCState, 4 >.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from PDBHeuristic< RCState, RCAction, RC, RCState, 4 >.
|
private |
Definition at line 490 of file RC.h.
Referenced by GetCornerLocationHash(), GetCornerLocationSize(), GetStateFromCornerLocationHash(), and RCPDB().
|
private |
Definition at line 489 of file RC.h.
Referenced by GetCornerRotationHash(), GetCornerRotationSize(), GetStateFromCornerRotationHash(), and RCPDB().
|
private |
Definition at line 488 of file RC.h.
Referenced by GetEdgeLocationHash(), GetEdgeLocationSize(), GetStateFromEdgeLocationHash(), and RCPDB().
|
private |
Definition at line 487 of file RC.h.
Referenced by GetEdgeRotationHash(), GetEdgeRotationSize(), GetStateFromEdgeRotationHash(), and RCPDB().