HOG2
|
This class does the basic permutation calculation with a regular N^2 permutation computation. More...
#include <LexPermutationPDB.h>
Public Member Functions | |
LexPermutationPDB (environment *e, const state &s, const std::vector< int > &distincts) | |
LexPermutationPDB (environment *e, const std::vector< state > &s, const std::vector< int > &distincts) | |
virtual uint64_t | GetPDBHash (const state &s, int threadID=0) const |
virtual void | GetStateFromPDBHash (uint64_t hash, state &s, int threadID=0) const |
virtual uint64_t | GetAbstractHash (const state &s, int threadID=0) const |
virtual state | GetStateFromAbstractState (state &s) const |
std::string | GetFileName (const char *prefix) |
Public Member Functions inherited from PermutationPDB< state, action, environment, 8 > | |
PermutationPDB (environment *e, const state &s, const std::vector< int > &distincts) | |
virtual uint64_t | GetPDBSize () const |
bool | Load (FILE *f) |
bool | Load (const char *prefix) |
void | Save (FILE *f) |
void | Save (const char *prefix) |
Public Member Functions inherited from PDBHeuristic< state, action, environment, state, bits > | |
PDBHeuristic (environment *e) | |
virtual | ~PDBHeuristic () |
void | SetGoal (const state &goal) |
void | SetGoal (const std::vector< state > &goals) |
virtual double | HCost (const state &a, const state &b) const |
void | ShuffleValues () |
This methods randomizes the entries in the PDB. More... | |
void | BuildPDB (const state &goal) |
void | BuildPDB (const state &goal, int numThreads) |
void | BuildPDBForward (const state &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false) |
void | BuildPDBForward (const std::vector< state > &goal, int numThreads, bool useCoarseOpen=true, bool verbose=false) |
void | BuildPDBBackward (const state &goal, int numThreads) |
void | BuildPDBForwardBackward (const state &goal, int numThreads) |
void | BuildAdditivePDB (const state &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< state > *h, state 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< state, action, environment, state, 5 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< state, action, environment, state, 4 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< state, action, environment, state, 3 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< state, action, environment, state, 2 > *, bool print_histogram) |
void | ValueRangeCompress (PDBHeuristic< state, action, environment, state, 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< state > | |
Heuristic () | |
virtual | ~Heuristic () |
Protected Attributes | |
std::vector< std::vector< int > > | dualCache |
std::vector< std::vector< int > > | locsCache |
Protected Attributes inherited from PermutationPDB< state, action, environment, 8 > | |
std::vector< int > | distinct |
size_t | puzzleSize |
uint64_t | pdbSize |
state | example |
Private Member Functions | |
uint64_t | Factorial (int val) const |
uint64_t | FactorialUpperK (int n, int k) const |
Additional Inherited Members | |
Public Attributes inherited from PDBHeuristic< state, action, environment, state, bits > | |
NBitArray< pdbBits > | PDB |
int | vrcValues [1<< pdbBits] |
PDBLookupType | type |
uint64_t | compressionValue |
environment * | env |
std::vector< state > | goalState |
Public Attributes inherited from Heuristic< state > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
This class does the basic permutation calculation with a regular N^2 permutation computation.
Definition at line 19 of file LexPermutationPDB.h.
LexPermutationPDB< state, action, environment, bits >::LexPermutationPDB | ( | environment * | e, |
const state & | s, | ||
const std::vector< int > & | distincts | ||
) |
Definition at line 45 of file LexPermutationPDB.h.
References PDBHeuristic< state, action, environment, state, bits >::SetGoal().
LexPermutationPDB< state, action, environment, bits >::LexPermutationPDB | ( | environment * | e, |
const std::vector< state > & | s, | ||
const std::vector< int > & | distincts | ||
) |
Definition at line 52 of file LexPermutationPDB.h.
References PDBHeuristic< state, action, environment, state, bits >::SetGoal().
|
private |
Definition at line 141 of file LexPermutationPDB.h.
|
private |
Definition at line 167 of file LexPermutationPDB.h.
|
inlinevirtual |
Implements PermutationPDB< state, action, environment, 8 >.
Definition at line 25 of file LexPermutationPDB.h.
References LexPermutationPDB< state, action, environment, bits >::GetPDBHash().
|
virtual |
Reimplemented from PermutationPDB< state, action, environment, 8 >.
Definition at line 153 of file LexPermutationPDB.h.
References PermutationPDB< state, action, environment, bits >::GetFileName().
|
virtual |
Implements PermutationPDB< state, action, environment, 8 >.
Definition at line 59 of file LexPermutationPDB.h.
Referenced by LexPermutationPDB< state, action, environment, bits >::GetAbstractHash().
|
inlinevirtual |
Implements PermutationPDB< state, action, environment, 8 >.
Definition at line 26 of file LexPermutationPDB.h.
|
virtual |
Implements PermutationPDB< state, action, environment, 8 >.
Definition at line 97 of file LexPermutationPDB.h.
|
mutableprotected |
Definition at line 40 of file LexPermutationPDB.h.
|
mutableprotected |
Definition at line 41 of file LexPermutationPDB.h.