|
ADS
Algorithms and Data Structures
|
Arrays of small unsigned integers packed in words, beyond the book: More...
#include "ADS/Contract.h"#include "ADS/external/MappedFile.h"#include "ADS/parallel/Executor.h"#include <algorithm>#include <array>#include <atomic>#include <cstddef>#include <cstdint>#include <span>#include <string_view>#include <vector>#include "ADS/succinct/impl/PackedArray.tpp"Go to the source code of this file.
Classes | |
| class | ADS::PackedArray< B, Saturate > |
| \( n \) unsigned fields of \( B \) bits, \( 64 / B \) to a word, the values above \( 2^B - 1 \) clamped to it if Saturate More... | |
| class | ADS::TritArray |
| \( n \) values in \( \{ 0 , 1 , 2 \} \), five to a byte in base 3 More... | |
Namespaces | |
| namespace | ADS |
Arrays of small unsigned integers packed in words, beyond the book:
Both are the tables of the searches in large spaces of states, e.g., the pattern databases of the heuristic search, whose entries are distances of a few bits (saturated at a cap) or their residues modulo 3 (Breyer and Korf), and which are filled by a scan of all the states; the constructors on an executor [see Executor.h] fill the fields by blocks of whole words (of whole bytes for TritArray), each block on one thread, so that no two threads write the same word and no atomic is needed. The widths that do not divide 64 are in BitVector [see get( i , len ) and put( i , v , len ) in BitVector.h], whose fields may cross two words (see Arrays of packed fields).
The contracts [see Contract.h]: the places are below \( n \), the values below \( 2^B \) unless Saturate (below 3 for TritArray); the invariant is that the bits past the last field are 0, and that each byte of a TritArray is below 243. The operations are defined in PackedArray.tpp.