Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::Cell_Context< Rank > Struct Template Reference

Per-cell context handed to rules that need to know "where" and "when" they are firing. More...

#include <ca-traits.H>

Collaboration diagram for Aleph::CA::Cell_Context< Rank >:
[legend]

Public Attributes

std::size_t step = 0
 Index of the step that is currently being computed (0-based).
 
Coord_Vec< Rank > coord {}
 Cell coordinate inside the current frame.
 

Detailed Description

template<std::size_t Rank>
struct Aleph::CA::Cell_Context< Rank >

Per-cell context handed to rules that need to know "where" and "when" they are firing.

Phase 8 introduces stochastic rules that derive deterministic, per-cell pseudo-random number generators from (step, coord). The CA engine fills a Cell_Context<Rank> once per cell and forwards it to the rule via apply_rule(). Deterministic rules remain unaffected because apply_rule() only forwards the context when the rule explicitly accepts it.

Template Parameters
Ranklattice dimension (1, 2 or 3 in the bundled lattices).

Definition at line 105 of file ca-traits.H.

Member Data Documentation

◆ coord

template<std::size_t Rank>
Coord_Vec<Rank> Aleph::CA::Cell_Context< Rank >::coord {}

Cell coordinate inside the current frame.

Definition at line 110 of file ca-traits.H.

Referenced by Aleph::CA::Per_Thread_RNG< Engine >::for_cell(), and TEST().

◆ step

template<std::size_t Rank>
std::size_t Aleph::CA::Cell_Context< Rank >::step = 0

Index of the step that is currently being computed (0-based).

Definition at line 108 of file ca-traits.H.

Referenced by Aleph::CA::Per_Thread_RNG< Engine >::for_cell().


The documentation for this struct was generated from the following file: