|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Phase 14 multi-field local rules for Aleph::CA.
More...
#include <concepts>#include <cstddef>#include <tuple>#include <type_traits>#include <utility>#include <ca-traits.H>#include <tpl_ca_concepts.H>Go to the source code of this file.
Classes | |
| struct | Aleph::CA::ca_mf_rule_detail::as_neighbor_view< T > |
| struct | Aleph::CA::ca_mf_rule_detail::neighbor_view_tuple< std::tuple< Fields... > > |
| class | Aleph::CA::Field_Slice_Rule< I, Inner > |
Adaptor: apply a mono-field rule to field I, leave the other fields unchanged. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
| namespace | Aleph::CA |
| namespace | Aleph::CA::ca_mf_rule_detail |
Concepts | |
| concept | Aleph::CA::BasicMultiFieldRule |
| Concept: a pure multi-field rule. | |
| concept | Aleph::CA::ContextualMultiFieldRule |
| Concept: a contextual multi-field rule. | |
| concept | Aleph::CA::MultiFieldRuleLike |
| Concept: any supported multi-field rule signature. | |
Typedefs | |
| template<typename FieldsTuple > | |
| using | Aleph::CA::Field_Neighbor_Views_Tuple = typename ca_mf_rule_detail::neighbor_view_tuple< FieldsTuple >::type |
std::tuple<Neighbor_View<F>...> for the field tuple std::tuple<F...>. | |
Functions | |
| template<typename Rule , typename FieldsTuple , std::size_t Rank> | |
| FieldsTuple | Aleph::CA::apply_multi_field_rule (const Rule &r, const FieldsTuple &cur, const Field_Neighbor_Views_Tuple< FieldsTuple > &nb, const Cell_Context< Rank > &ctx) |
| Invoke a multi-field rule with optional context forwarding. | |
Phase 14 multi-field local rules for Aleph::CA.
A multi-field rule is the natural transition function for a Multi_Field_Lattice: it consumes the per-field current values and per-field neighbour views of a single cell, and returns the tuple of next-step values for that cell.
Two signature flavours are supported, both detected via apply_multi_field_rule:
r(current_tuple, neighbours_tuple) → std::tuple<Fields...>.r(current_tuple, neighbours_tuple, ctx) → std::tuple<Fields...> (ctx is Cell_Context<Rank>).current_tuple is std::tuple<Field_0, Field_1, ...> and neighbours_tuple is std::tuple<Neighbor_View<Field_0>, Neighbor_View<Field_1>, ...>. The two tuples carry one element per field, in the order the fields were declared in the lattice.
Adapters bridge this contract to the existing mono-field rules:
Field_Slice_Rule<I, Inner>: applies a regular RuleLike to field I, propagating the other fields untouched.Definition in file tpl_ca_multi_field_rule.H.