PBeFS
Parallel Best-First Search
Loading...
Searching...
No Matches
Mod3Entries Class Reference

the entries of a pattern table, the distance modulo 3, five in a byte More...

#include <PBeFS/astar/PatternDatabase.h>

Public Member Functions

int residue (std::uint64_t r, int) const noexcept
 the residue modulo 3 of the distance of the rank r, whose placement has Manhattan distance m
std::uint64_t entries (void) const noexcept
 the number of the entries
std::size_t bytes (void) const noexcept
 the bytes of the entries
std::vector< std::uint8_t > payload (void) const
 the bytes written in a file

Static Public Member Functions

template<class M>
static Mod3Entries encode (const std::vector< std::uint8_t > &h, M &&, unsigned=1)
 the encoding of the distances h
static Mod3Entries decode (std::vector< std::uint8_t > data, std::uint64_t n, unsigned=1)
 the encoding of n entries read from a file

Static Public Attributes

static constexpr std::uint32_t code = 3
 the code in a file
static constexpr const char * name = "mod3"
 the name
static constexpr bool relative = true
 relative values
static constexpr int modulus = 3
 values modulo 3

Detailed Description

the entries of a pattern table, the distance modulo 3, five in a byte

The byte holds \( \sum_{j < 5} x_j 3^j \) for the residues \( x_j \) of five consecutive ranks, i.e., \( 8 / 5 = 1.6 \) bits per entry (Breyer and Korf, AAAI 2010). The value of a placement is not stored: it is that of a neighbour plus the difference of the residues [see AdditivePDB::delta()], or it is found from the residues alone by a descent to the goal [see PatternTable::exact()]; both need a table whose neighbours differ by at most one, i.e., with the blank ignored.

Member Function Documentation

◆ bytes()

std::size_t bytes ( void ) const
inlinenodiscardnoexcept

the bytes of the entries

◆ decode()

Mod3Entries decode ( std::vector< std::uint8_t > data,
std::uint64_t n,
unsigned = 1 )
inlinestaticnodiscard

the encoding of n entries read from a file

◆ encode()

template<class M>
Mod3Entries encode ( const std::vector< std::uint8_t > & h,
M && ,
unsigned = 1 )
inlinestaticnodiscard

the encoding of the distances h

◆ entries()

std::uint64_t entries ( void ) const
inlinenodiscardnoexcept

the number of the entries

◆ payload()

std::vector< std::uint8_t > payload ( void ) const
inlinenodiscard

the bytes written in a file

◆ residue()

int residue ( std::uint64_t r,
int  ) const
inlinenodiscardnoexcept

the residue modulo 3 of the distance of the rank r, whose placement has Manhattan distance m

Member Data Documentation

◆ code

std::uint32_t code = 3
staticconstexpr

the code in a file

◆ modulus

int modulus = 3
staticconstexpr

values modulo 3

◆ name

const char* name = "mod3"
staticconstexpr

the name

◆ relative

bool relative = true
staticconstexpr

relative values


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