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

the entries of a pattern table, the second bit of the distance, eight in a byte More...

#include <PBeFS/astar/PatternDatabase.h>

Public Member Functions

int residue (std::uint64_t r, int m) const noexcept
 the residue modulo 4 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 ParityBitEntries encode (const std::vector< std::uint8_t > &h, M &&m, unsigned=1)
 the encoding of the distances h
static ParityBitEntries 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 = 6
 the code in a file
static constexpr const char * name = "bit"
 the name
static constexpr bool relative = true
 relative values
static constexpr int modulus = 4
 values modulo 4

Detailed Description

the entries of a pattern table, the second bit of the distance, eight in a byte

With the blank ignored, every move of the abstraction costs 1 and changes the Manhattan distance m of the pattern by one unit, so that the distance h has the parity of m and two neighbours differ by exactly one; hence the bit \( \lfloor h / 2 \rfloor \bmod 2 \) and the parity of m give h modulo 4, which tells \( +1 \) from \( -1 \). This is the 1-bit encoding of Clausecker and Reinefeld (SoCS 2019); like Mod3Entries, its values are relative [see Mod3Entries].

Member Function Documentation

◆ bytes()

std::size_t bytes ( void ) const
inlinenodiscardnoexcept

the bytes of the entries

◆ decode()

ParityBitEntries 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>
ParityBitEntries encode ( const std::vector< std::uint8_t > & h,
M && 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 m ) const
inlinenodiscardnoexcept

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

Member Data Documentation

◆ code

std::uint32_t code = 6
staticconstexpr

the code in a file

◆ modulus

int modulus = 4
staticconstexpr

values modulo 4

◆ name

const char* name = "bit"
staticconstexpr

the name

◆ relative

bool relative = true
staticconstexpr

relative values


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