Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
tpl_ca_bit_storage.H File Reference

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>
Include dependency graph for tpl_ca_bit_storage.H:
This graph shows which files directly or indirectly include this file:

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.
 

Detailed Description

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.

Author
Leandro Rabindranath Leon

Definition in file tpl_ca_bit_storage.H.