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

Dense, contiguous storage for cellular automata cells (1D/2D/3D). More...

#include <cstddef>
#include <utility>
#include <ah-errors.H>
#include <ah-mdspan.H>
#include <tpl_array.H>
#include <ca-traits.H>
#include <tpl_ca_concepts.H>
Include dependency graph for tpl_ca_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::Dense_Cell_Storage< T, N >
 Row-major dense storage for N-dimensional cellular automata. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 
namespace  Aleph::CA
 

Functions

template<typename T , std::size_t N>
void Aleph::CA::swap (Dense_Cell_Storage< T, N > &a, Dense_Cell_Storage< T, N > &b) noexcept
 Free-function swap so the storage plays nicely with std::swap.
 

Detailed Description

Dense, contiguous storage for cellular automata cells (1D/2D/3D).

Provides Aleph::CA::Dense_Cell_Storage<T, N>, a row-major contiguous container that satisfies the LatticeLike concept of tpl_ca_concepts.H (it can be used directly as the current / next buffer of an engine, or wrapped by Lattice<Storage, Boundary>). The implementation is built on top of Aleph::Array<T>.

Public surface:

  • state_type, coord_type, extents_type, rank.
  • dimension(), size(), size(d), extents().
  • linear_index(coord).
  • at(coord), at(i), at(i,j), at(i,j,k).
  • set(coord, v).
  • data(), data() const.
  • swap(other) (O(1)), fill(value).
Author
Leandro Rabindranath Leon

Definition in file tpl_ca_storage.H.