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

#include <RubiksCubeCorners.h>

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

Public Member Functions

 RubikCornerPDB (RubiksCorner *e, const RubiksCornerState &s, std::vector< int > &distinctCorners)
 
uint64_t GetPDBSize () const
 
uint64_t GetPDBHash (const RubiksCornerState &s, int threadID=0) const
 
virtual uint64_t GetAbstractHash (const RubiksCornerState &s, int threadID=0) const
 
void GetStateFromPDBHash (uint64_t hash, RubiksCornerState &s, int threadID=0) const
 
RubiksCornerState GetStateFromAbstractState (RubiksCornerState &s) const
 
virtual bool Load (const char *prefix)
 
virtual void Save (const char *prefix)
 
virtual bool Load (FILE *f)
 
virtual void Save (FILE *f)
 
virtual std::string GetFileName (const char *prefix)
 
- Public Member Functions inherited from PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >
 PDBHeuristic (RubiksCorner *e)
 
virtual ~PDBHeuristic ()
 
void SetGoal (const RubiksCornerState &goal)
 
void SetGoal (const std::vector< RubiksCornerState > &goals)
 
virtual double HCost (const RubiksCornerState &a, const RubiksCornerState &b) const
 
virtual uint64_t GetPDBSize () const=0
 
void ShuffleValues ()
 This methods randomizes the entries in the PDB. More...
 
void BuildPDB (const RubiksCornerState &goal)
 
void BuildPDB (const RubiksCornerState &goal, int numThreads)
 
void BuildPDBForward (const RubiksCornerState &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false)
 
void BuildPDBForward (const std::vector< RubiksCornerState > &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false)
 
void BuildPDBBackward (const RubiksCornerState &goal, int numThreads)
 
void BuildPDBForwardBackward (const RubiksCornerState &goal, int numThreads)
 
void BuildAdditivePDB (const RubiksCornerState &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< RubiksCornerState > *h, RubiksCornerState 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< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 5 > *, bool print_histogram)
 
void ValueRangeCompress (PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 > *, bool print_histogram)
 
void ValueRangeCompress (PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 3 > *, bool print_histogram)
 
void ValueRangeCompress (PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 2 > *, bool print_histogram)
 
void ValueRangeCompress (PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 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< RubiksCornerState >
 Heuristic ()
 
virtual ~Heuristic ()
 

Static Public Member Functions

static uint64_t GetStateSpaceSize ()
 
static uint64_t GetStateHash (const RubiksCornerState &s)
 
static void GetStateFromHash (RubiksCornerState &s, uint64_t hash)
 

Private Member Functions

uint64_t Factorial (int val) const
 
uint64_t FactorialUpperK (int n, int k) const
 

Private Attributes

std::vector< int > corners
 
size_t puzzleSize
 
uint64_t pdbSize
 
MR1KPermutation mr1
 

Additional Inherited Members

- Public Attributes inherited from PDBHeuristic< RubiksCornerState, RubiksCornersAction, RubiksCorner, RubiksCornerState, 4 >
NBitArray< pdbBits > PDB
 
int vrcValues [1<< pdbBits]
 
PDBLookupType type
 
uint64_t compressionValue
 
RubiksCornerenv
 
std::vector< RubiksCornerStategoalState
 
- Public Attributes inherited from Heuristic< RubiksCornerState >
std::vector< HeuristicTreeNodelookups
 
std::vector< Heuristic * > heuristics
 
uint64_t histogram [256]
 

Detailed Description

Definition at line 194 of file RubiksCubeCorners.h.

Constructor & Destructor Documentation

◆ RubikCornerPDB()

RubikCornerPDB::RubikCornerPDB ( RubiksCorner e,
const RubiksCornerState s,
std::vector< int > &  distinctCorners 
)

Member Function Documentation

◆ Factorial()

uint64_t RubikCornerPDB::Factorial ( int  val) const
private

Definition at line 1450 of file RubiksCubeCorners.cpp.

◆ FactorialUpperK()

uint64_t RubikCornerPDB::FactorialUpperK ( int  n,
int  k 
) const
private

Definition at line 1461 of file RubiksCubeCorners.cpp.

Referenced by GetPDBHash(), and GetStateFromPDBHash().

◆ GetAbstractHash()

virtual uint64_t RubikCornerPDB::GetAbstractHash ( const RubiksCornerState s,
int  threadID = 0 
) const
inlinevirtual

◆ GetFileName()

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

◆ GetPDBHash()

uint64_t RubikCornerPDB::GetPDBHash ( const RubiksCornerState s,
int  threadID = 0 
) const
virtual

◆ GetPDBSize()

uint64_t RubikCornerPDB::GetPDBSize ( ) const

◆ GetStateFromAbstractState()

RubiksCornerState RubikCornerPDB::GetStateFromAbstractState ( RubiksCornerState s) const
inlinevirtual

◆ GetStateFromHash()

void RubikCornerPDB::GetStateFromHash ( RubiksCornerState s,
uint64_t  hash 
)
static

Definition at line 1201 of file RubiksCubeCorners.cpp.

References RubiksCorner::GetStateFromHash().

Referenced by RubikPDB::GetStateFromHash().

◆ GetStateFromPDBHash()

void RubikCornerPDB::GetStateFromPDBHash ( uint64_t  hash,
RubiksCornerState s,
int  threadID = 0 
) const
virtual

◆ GetStateHash()

uint64_t RubikCornerPDB::GetStateHash ( const RubiksCornerState s)
static

Definition at line 1195 of file RubiksCubeCorners.cpp.

References RubiksCorner::GetStateHash().

◆ GetStateSpaceSize()

uint64_t RubikCornerPDB::GetStateSpaceSize ( )
static

Definition at line 1189 of file RubiksCubeCorners.cpp.

◆ Load() [1/2]

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

◆ Load() [2/2]

bool RubikCornerPDB::Load ( FILE *  f)
virtual

◆ Save() [1/2]

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

◆ Save() [2/2]

void RubikCornerPDB::Save ( FILE *  f)
virtual

Member Data Documentation

◆ corners

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

◆ mr1

MR1KPermutation RubikCornerPDB::mr1
private

Definition at line 217 of file RubiksCubeCorners.h.

Referenced by GetPDBHash(), and GetStateFromPDBHash().

◆ pdbSize

uint64_t RubikCornerPDB::pdbSize
private

Definition at line 216 of file RubiksCubeCorners.h.

Referenced by Load(), and Save().

◆ puzzleSize

size_t RubikCornerPDB::puzzleSize
private

Definition at line 215 of file RubiksCubeCorners.h.

Referenced by Load(), and Save().


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