Go to the documentation of this file.
14 #ifndef TopSpinGraph_H
15 #define TopSpinGraph_H
32 std::vector<uint8_t>
DB;
59 uint64_t
GetStateHash(
const std::vector<int> &config)
const;
60 uint64_t
GetStateHash(
const int *config,
int config_size)
const;
61 uint64_t
GetPDBHash(
const std::vector<int> &config,
int pdb_size)
const;
63 uint64_t
GetPDBSize(
int puzzle_size,
int pdb_size)
const;
68 void Flip(std::vector<int> &arrangement,
int index,
int radius)
const;
72 mutable std::vector<TopSpinGraphData>
data;
uint64_t GetStateHash(const graphState &state) const
TopSpinHashTable hashTable
virtual double HCost(const graphState &state1, const graphState &state2) const
void SetState(TopSpinGraph *tss)
uint64_t GetPDBSize(int puzzle_size, int pdb_size) const
graphState Dual(graphState s)
std::vector< uint8_t > DB
uint64_t GetPDBHash(const std::vector< int > &config, int pdb_size) const
std::vector< TopSpinGraphData > data
virtual ~TopSpinGraphHeuristic()
void ExpandNode(const graphState &stateID) const
std::unordered_map< uint64_t, unsigned long, Hash64 > TopSpinHashTable
virtual bool GoalTest(graphState &) const
graphState GetState(const std::vector< int > &configuration) const
TopSpinGraph(int m, int k, TopSpinGraphHeuristic *tsh)
bool GoalTest(const graphState &state, const graphState &goal) const
void Flip(std::vector< int > &arrangement, int index, int radius) const
std::vector< int > config
void GetSuccessors(const graphState &stateID, std::vector< graphState > &neighbors) const
void GetActions(const graphState &stateID, std::vector< graphMove > &actions) const