|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Bit-packed dense storage for boolean cellular automata. More...
#include <cstddef>#include <limits>#include <utility>#include <ah-errors.H>#include <bitArray.H>#include <ca-traits.H>#include <tpl_ca_concepts.H>Go to the source code of this file.
Classes | |
| class | Aleph::CA::Bit_Cell_Storage< N > |
Bit-packed row-major storage for N-dimensional binary CAs. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
| namespace | Aleph::CA |
Functions | |
| template<std::size_t N> | |
| void | Aleph::CA::swap (Bit_Cell_Storage< N > &a, Bit_Cell_Storage< N > &b) noexcept |
| Free-function swap so the storage plays nicely with std::swap. | |
Bit-packed dense storage for boolean cellular automata.
Provides Aleph::CA::Bit_Cell_Storage<N> — a 1 bit/cell row-major container backed by Aleph::BitArray. Useful for binary CAs (Game of Life, Wolfram 1D, Brian's Brain etc.) where memory and cache footprint matter.
The class mirrors the read/write surface of Dense_Cell_Storage<bool, N> so that lattices and engines can be parametrised on either backend transparently. The only API difference is the absence of a raw data() pointer: bit packing precludes a contiguous bool* view.
Definition in file tpl_ca_bit_storage.H.