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

the entries of a pattern table, the least excess of each group of ranks More...

#include <PBeFS/astar/PatternDatabase.h>

Public Member Functions

int value (std::uint64_t r, int m) const noexcept
 the value of the rank r, whose placement has Manhattan distance m
std::uint64_t entries (void) const noexcept
 the number of the entries
unsigned group (void) const noexcept
 the ranks per group
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 MinNibbleEntries encode (const std::vector< std::uint8_t > &h, M &&m, unsigned c=1)
 the encoding of the distances h, by groups of c ranks
static MinNibbleEntries decode (std::vector< std::uint8_t > data, std::uint64_t n, unsigned c=1)
 the encoding of n entries read from a file

Static Public Attributes

static constexpr std::uint32_t code = 4
 the code in a file
static constexpr const char * name = "min"
 the name
static constexpr bool relative = false
 absolute values

Detailed Description

the entries of a pattern table, the least excess of each group of ranks

The ranks are grouped by c consecutive ones, c a power of 2, and the group stores the least excess over Manhattan of its placements in 4 bits, saturated at 15, i.e., \( 4 / c \) bits per entry: the lossy compression of Felner, Korf, Meshulam and Holte (JAIR 2007), which here keeps the Manhattan distance of each placement. The value is at most the exact one, hence admissible, but a table so compressed is not consistent in general. Consecutive ranks differ in the cell of the last tile of the pattern only, so that a group holds placements that are close.

Member Function Documentation

◆ bytes()

std::size_t bytes ( void ) const
inlinenodiscardnoexcept

the bytes of the entries

◆ decode()

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

the encoding of n entries read from a file

◆ encode()

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

the encoding of the distances h, by groups of c ranks

◆ entries()

std::uint64_t entries ( void ) const
inlinenodiscardnoexcept

the number of the entries

◆ group()

unsigned group ( void ) const
inlinenodiscardnoexcept

the ranks per group

◆ payload()

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

the bytes written in a file

◆ value()

int value ( std::uint64_t r,
int m ) const
inlinenodiscardnoexcept

the value of the rank r, whose placement has Manhattan distance m

Member Data Documentation

◆ code

std::uint32_t code = 4
staticconstexpr

the code in a file

◆ name

const char* name = "min"
staticconstexpr

the name

◆ relative

bool relative = false
staticconstexpr

absolute values


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