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

the entries of a pattern table, one byte each: the distance itself More...

#include <PBeFS/astar/PatternDatabase.h>

Public Member Functions

int value (std::uint64_t r, int) 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
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 ByteEntries encode (const std::vector< std::uint8_t > &h, M &&, unsigned=1)
 the encoding of the distances h
static ByteEntries 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 = 1
 the code in a file
static constexpr const char * name = "byte"
 the name
static constexpr bool relative = false
 absolute values

Detailed Description

the entries of a pattern table, one byte each: the distance itself

Every encoding has the code and the name written in the files, tells whether its value needs that of a neighbour (relative), and is built by encode( h , m , c ) from the distances h, the Manhattan distance m( r ) of the placement of rank r and the parameter c, or by decode() from the bytes of payload(). The entries are held by the packed arrays of ADS, whose fields lie in the bytes as they do in the files.

Member Function Documentation

◆ bytes()

std::size_t bytes ( void ) const
inlinenodiscardnoexcept

the bytes of the entries

◆ decode()

ByteEntries 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>
ByteEntries 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

◆ value()

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

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

Member Data Documentation

◆ code

std::uint32_t code = 1
staticconstexpr

the code in a file

◆ name

const char* name = "byte"
staticconstexpr

the name

◆ relative

bool relative = false
staticconstexpr

absolute values


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