ByteEntries
Declared in astar/PatternDatabase.h; the same class on the site of Doxygen.
-
class ByteEntries
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.
Public Functions
-
inline int value(std::uint64_t r, int) const noexcept
the value of the rank r, whose placement has Manhattan distance m
-
inline std::uint64_t entries(void) const noexcept
the number of the entries
-
inline std::size_t bytes(void) const noexcept
the bytes of the entries
-
inline std::vector<std::uint8_t> payload(void) const
the bytes written in a file
Public Static Functions
-
template<class M>
static inline ByteEntries encode(const std::vector<std::uint8_t> &h, M&&, unsigned = 1) the encoding of the distances h
-
static inline ByteEntries decode(std::vector<std::uint8_t> data, std::uint64_t n, unsigned = 1)
the encoding of n entries read from a file
-
inline int value(std::uint64_t r, int) const noexcept