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

Classical double-buffer synchronous update. More...

#include <tpl_ca_update_scheme.H>

Inheritance diagram for Aleph::CA::Synchronous_Update< Order >:
[legend]

Public Member Functions

template<typename Engine , typename Rule >
void apply (Engine &e, Rule &r) const
 Execute one synchronous step.
 

Static Public Attributes

static constexpr bool requires_double_buffer = true
 Engines must allocate a second buffer for this scheme.
 
static constexpr bool requires_block_rule = false
 Operates on cell rules — not on block rules.
 

Detailed Description

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

Classical double-buffer synchronous update.

Reads the current frame, computes every cell's next state, writes into the next-buffer, then swaps the two buffers in O(1). Equivalent to the Phase 3 Synchronous_Engine; provided as a strategy so the Phase 13 engine can pick it up like any other scheme.

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

Definition at line 250 of file tpl_ca_update_scheme.H.

Member Function Documentation

◆ apply()

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

Execute one synchronous step.

Template Parameters
Engineengine type providing current_buffer(), next_buffer(), swap_buffers(), 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 268 of file tpl_ca_update_scheme.H.

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

Member Data Documentation

◆ requires_block_rule

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

Operates on cell rules — not on block rules.

Definition at line 255 of file tpl_ca_update_scheme.H.

◆ requires_double_buffer

template<typename Order = RowMajor>
constexpr bool Aleph::CA::Synchronous_Update< Order >::requires_double_buffer = true
staticconstexpr

Engines must allocate a second buffer for this scheme.

Definition at line 253 of file tpl_ca_update_scheme.H.


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