|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Adaptor: apply a mono-field rule to field I, leave the other fields unchanged.
More...
#include <tpl_ca_multi_field_rule.H>
Public Member Functions | |
| constexpr | Field_Slice_Rule (Inner inner) |
| Wrap a mono-field rule. | |
| template<typename FieldsTuple > | |
| FieldsTuple | operator() (const FieldsTuple &cur, const Field_Neighbor_Views_Tuple< FieldsTuple > &nb) const |
| Pure-form invocation. | |
| template<typename FieldsTuple , std::size_t Rank> | |
| FieldsTuple | operator() (const FieldsTuple &cur, const Field_Neighbor_Views_Tuple< FieldsTuple > &nb, const Cell_Context< Rank > &ctx) const |
| Contextual-form invocation. | |
Private Attributes | |
| Inner | inner_ |
Adaptor: apply a mono-field rule to field I, leave the other fields unchanged.
Lets the user reuse any existing RuleLike (Game of Life, outer-totalistic, continuous, lookup, ...) on a single channel of a multi-field lattice without touching the other channels. The inner rule sees only field I's current value and field I's neighbours.
| I | index of the targeted field. |
| Inner | mono-field rule type. |
Definition at line 181 of file tpl_ca_multi_field_rule.H.
|
inlineexplicitconstexpr |
Wrap a mono-field rule.
| [in] | inner | mono-field rule (consumed by move). |
Definition at line 189 of file tpl_ca_multi_field_rule.H.
|
inline |
Pure-form invocation.
| FieldsTuple | lattice's std::tuple<Fields...>. |
| [in] | cur | current per-field values. |
| [in] | nb | per-field neighbour views. |
I is replaced by inner(cur, nb) and the other fields keep their current values. Definition at line 200 of file tpl_ca_multi_field_rule.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::Field_Slice_Rule< I, Inner >::inner_, and out.
|
inline |
Contextual-form invocation.
Forwards the context to inner when it accepts it.
Definition at line 214 of file tpl_ca_multi_field_rule.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::Field_Slice_Rule< I, Inner >::inner_, and out.
|
private |
Definition at line 183 of file tpl_ca_multi_field_rule.H.
Referenced by Aleph::CA::Field_Slice_Rule< I, Inner >::operator()(), and Aleph::CA::Field_Slice_Rule< I, Inner >::operator()().