|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Critters reversible CA block rule. More...
#include <tpl_ca_block_rule.H>
Public Member Functions | |
| template<typename State > | |
| constexpr Block_2x2< State > | operator() (const Block_2x2< State > &in) const noexcept |
| Apply the Critters block rule. | |
Critters reversible CA block rule.
Specification (Toffoli & Margolus, 1987):
Both branches are involutions and their composition is also an involution: applying the rule twice to the same block returns the original block. Combined with the Margolus 2×2 partition (which alternates origin between consecutive steps), the resulting CA is bit-exact reversible.
Definition at line 140 of file tpl_ca_block_rule.H.
|
inlineconstexprnoexcept |
Apply the Critters block rule.
| State | cell state (binary; bool or any integral with 0 = empty / 1 = alive). |
| [in] | in | current 2×2 block (NW, NE, SW, SE). |
| This | function does not throw. |
Definition at line 151 of file tpl_ca_block_rule.H.
References Aleph::blossom_maximum_cardinality_matching(), and out.