|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Toffoli–Margolus (TM) lattice-gas 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 TM lattice-gas block rule. | |
Toffoli–Margolus (TM) lattice-gas block rule.
A close cousin of BBM that conserves particle count while exposing a different mobility pattern: particles bounce off horizontal walls instead of moving diagonally. For each 2×2 block:
Each branch is an involution and the resulting CA conserves the particle count exactly, making the Margolus update reversible bit-for-bit (forward(N) ∘ backward(N) = identity).
Definition at line 254 of file tpl_ca_block_rule.H.
|
inlineconstexprnoexcept |
Apply the TM lattice-gas block rule.
| State | binary cell state. |
| [in] | in | current 2×2 block. |
| This | function does not throw. |
Definition at line 264 of file tpl_ca_block_rule.H.
References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), and out.