SlidingTilePDB
Declared in astar/PatternDatabase.h; the same class on the site of Doxygen.
-
template<int W, int H, class Enc = NibbleEntries>
class SlidingTilePDB : public PBeFS_di_unipi_it::SlidingTile<W, H> the sliding-tile puzzle with an additive pattern database heuristic
The domain SlidingTile, with all its features, hashes and abstractions, whose heuristic is that of an AdditivePDB (which must outlive it) in place of the Manhattan distance; the goal is that of the tables. With Mod3Entries the heuristic of a successor is that of its parent plus the change of the table of the tile moved, which the residues give, and only the initial state is looked up from the residues alone; this needs the sum without the reflection, since from the maximum of two sums the parts cannot be told apart.
Public Types
-
using Base = SlidingTile<W, H>
the puzzle
-
using PDB = AdditivePDB<W, H, Enc>
the heuristic
Public Functions
-
inline SlidingTilePDB(const board_type &start, const PDB &pdb)
constructor, taking the start board and the heuristic
-
inline cost_type heuristic(state_type s) const
the heuristic of s, looked up in the tables
-
template<class F>
inline void for_each_successor(state_type s, cost_type h, F &&f) const calls f( t , 1 , h( t ) ) for each successor t of s
-
template<class F>
inline void for_each_successor(state_type s, cost_type h, std::uint8_t op, F &&f) const as above, but without the successor that op leads back to [see SlidingTile]
Public Static Functions
-
static inline void cells_of(state_type s, std::uint8_t *q) noexcept
writes in q the cell of each tile of s
-
using Base = SlidingTile<W, H>
