|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Fredkin–Toffoli Billiard Ball Machine 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 BBM block rule. | |
Fredkin–Toffoli Billiard Ball Machine block rule.
Specification (Margolus 1984): the block's next state is computed by counting alive cells:
The rule is its own inverse on every input pattern, so the associated Margolus CA is reversible and conserves the number of alive cells (particles).
Definition at line 185 of file tpl_ca_block_rule.H.
|
inlineconstexprnoexcept |
Apply the BBM block rule.
| State | binary cell state. |
| [in] | in | current 2×2 block. |
| This | function does not throw. |
Definition at line 195 of file tpl_ca_block_rule.H.
References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), and out.