HOG2
Public Member Functions | Private Attributes | List of all members
RubikPDB Class Reference

#include <RubiksCube.h>

Inheritance diagram for RubikPDB:
Inheritance graph
[legend]
Collaboration diagram for RubikPDB:
Collaboration graph
[legend]

Public Member Functions

 RubikPDB (RubiksCube *e, const RubiksState &s, std::vector< int > distinctEdges, std::vector< int > distinctCorners)
 
uint64_t GetStateHash (const RubiksState &s) const
 
void GetStateFromHash (RubiksState &s, uint64_t hash) const
 
uint64_t GetPDBSize () const
 
uint64_t GetPDBHash (const RubiksState &s, int threadID=0) const
 
virtual uint64_t GetAbstractHash (const RubiksState &s, int threadID=0) const
 
void GetStateFromPDBHash (uint64_t hash, RubiksState &s, int threadID=0) const
 
RubiksState GetStateFromAbstractState (RubiksState &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< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >
 PDBHeuristic (RubiksCube *e)
 
virtual ~PDBHeuristic ()
 
void SetGoal (const RubiksState &goal)
 
void SetGoal (const std::vector< RubiksState > &goals)
 
virtual double HCost (const RubiksState &a, const RubiksState &b) const
 
virtual uint64_t GetPDBSize () const=0
 
void ShuffleValues ()
 This methods randomizes the entries in the PDB. More...
 
void BuildPDB (const RubiksState &goal)
 
void BuildPDB (const RubiksState &goal, int numThreads)
 
void BuildPDBForward (const RubiksState &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false)
 
void BuildPDBForward (const std::vector< RubiksState > &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false)
 
void BuildPDBBackward (const RubiksState &goal, int numThreads)
 
void BuildPDBForwardBackward (const RubiksState &goal, int numThreads)
 
void BuildAdditivePDB (const RubiksState &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< RubiksState > *h, RubiksState 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< RubiksState, RubiksAction, RubiksCube, RubiksState, 5 > *, bool print_histogram)
 
void ValueRangeCompress (PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 > *, bool print_histogram)
 
void ValueRangeCompress (PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 3 > *, bool print_histogram)
 
void ValueRangeCompress (PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 2 > *, bool print_histogram)
 
void ValueRangeCompress (PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 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< RubiksState >
 Heuristic ()
 
virtual ~Heuristic ()
 

Private Attributes

RubikEdgePDB ePDB
 
RubikCornerPDB cPDB
 
std::vector< int > edges
 
std::vector< int > corners
 

Additional Inherited Members

- Public Attributes inherited from PDBHeuristic< RubiksState, RubiksAction, RubiksCube, RubiksState, 4 >
NBitArray< pdbBits > PDB
 
int vrcValues [1<< pdbBits]
 
PDBLookupType type
 
uint64_t compressionValue
 
RubiksCubeenv
 
std::vector< RubiksStategoalState
 
- Public Attributes inherited from Heuristic< RubiksState >
std::vector< HeuristicTreeNodelookups
 
std::vector< Heuristic * > heuristics
 
uint64_t histogram [256]
 

Detailed Description

Definition at line 219 of file RubiksCube.h.

Constructor & Destructor Documentation

◆ RubikPDB()

RubikPDB::RubikPDB ( RubiksCube e,
const RubiksState s,
std::vector< int >  distinctEdges,
std::vector< int >  distinctCorners 
)

Member Function Documentation

◆ GetAbstractHash()

virtual uint64_t RubikPDB::GetAbstractHash ( const RubiksState s,
int  threadID = 0 
) const
inlinevirtual

◆ GetFileName()

std::string RubikPDB::GetFileName ( const char *  prefix)
virtual

◆ GetPDBHash()

uint64_t RubikPDB::GetPDBHash ( const RubiksState s,
int  threadID = 0 
) const
virtual

◆ GetPDBSize()

uint64_t RubikPDB::GetPDBSize ( ) const

Definition at line 844 of file RubiksCube.cpp.

References cPDB, ePDB, RubikCornerPDB::GetPDBSize(), and RubikEdgePDB::GetPDBSize().

◆ GetStateFromAbstractState()

RubiksState RubikPDB::GetStateFromAbstractState ( RubiksState s) const
inlinevirtual

◆ GetStateFromHash()

void RubikPDB::GetStateFromHash ( RubiksState s,
uint64_t  hash 
) const

◆ GetStateFromPDBHash()

void RubikPDB::GetStateFromPDBHash ( uint64_t  hash,
RubiksState s,
int  threadID = 0 
) const
virtual

◆ GetStateHash()

uint64_t RubikPDB::GetStateHash ( const RubiksState s) const

Definition at line 831 of file RubiksCube.cpp.

◆ Load() [1/2]

bool RubikPDB::Load ( const char *  prefix)
virtual

◆ Load() [2/2]

bool RubikPDB::Load ( FILE *  f)
virtual

◆ OpenGLDraw()

void RubikPDB::OpenGLDraw ( ) const
inline

◆ Save() [1/2]

void RubikPDB::Save ( const char *  prefix)
virtual

◆ Save() [2/2]

void RubikPDB::Save ( FILE *  f)
virtual

Member Data Documentation

◆ corners

std::vector<int> RubikPDB::corners
private

Definition at line 249 of file RubiksCube.h.

Referenced by Load(), and Save().

◆ cPDB

RubikCornerPDB RubikPDB::cPDB
private

◆ edges

std::vector<int> RubikPDB::edges
private

Definition at line 248 of file RubiksCube.h.

Referenced by Load(), and Save().

◆ ePDB

RubikEdgePDB RubikPDB::ePDB
private

The documentation for this class was generated from the following files: