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

In-place sequential update (no double buffer). More...

#include <tpl_ca_update_scheme.H>

Public Member Functions

template<typename Engine , typename Rule >
void apply (Engine &e, Rule &r) const
 Execute one sequential in-place step.
 

Static Public Attributes

static constexpr bool requires_double_buffer = false
 Operates in place, no second buffer needed.
 
static constexpr bool requires_block_rule = false
 Operates on cell rules.
 

Detailed Description

template<typename Order = RowMajor>
struct Aleph::CA::Sequential_Update< Order >

In-place sequential update (no double buffer).

Visits every cell in Order and writes the new value back to the same lattice. Each cell sees the partially-updated neighbourhood, which is the dynamics needed by sandpile-style relaxation models and many physics-flavoured CAs. The choice of Order materially changes the qualitative behaviour, on purpose.

Template Parameters
Orderiteration tag (RowMajor, ColumnMajor, Tile<W, H>).

Definition at line 310 of file tpl_ca_update_scheme.H.

Member Function Documentation

◆ apply()

template<typename Order = RowMajor>
template<typename Engine , typename Rule >
void Aleph::CA::Sequential_Update< Order >::apply ( Engine &  e,
Rule &  r 
) const
inline

Execute one sequential in-place step.

Template Parameters
Engineengine type providing current_buffer(), neighborhood() and step_count().
Rulecell rule satisfying RuleLike<Rule, Lattice>.
Parameters
[in,out]eengine reference.
[in]rrule reference.
Exceptions
Anyexception propagated by the rule or the lattice.

Definition at line 327 of file tpl_ca_update_scheme.H.

References Aleph::CA::apply_rule(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::gather_neighbors(), Aleph::next(), and r.

Member Data Documentation

◆ requires_block_rule

template<typename Order = RowMajor>
constexpr bool Aleph::CA::Sequential_Update< Order >::requires_block_rule = false
staticconstexpr

Operates on cell rules.

Definition at line 315 of file tpl_ca_update_scheme.H.

◆ requires_double_buffer

template<typename Order = RowMajor>
constexpr bool Aleph::CA::Sequential_Update< Order >::requires_double_buffer = false
staticconstexpr

Operates in place, no second buffer needed.

Definition at line 313 of file tpl_ca_update_scheme.H.

Referenced by main(), and TEST().


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