|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Rule adapter for History_Cell<State, Depth>.
More...
#include <tpl_ca_continuous_rules.H>
Public Member Functions | |
| History_Rule (F func) | |
| Construct a history rule from a functor. | |
| template<typename State > | |
| History_Cell< State, Depth > | operator() (const History_Cell< State, Depth > ¤t, Neighbor_View< History_Cell< State, Depth > > neighbours) const |
| Compute the next history-bearing cell state. | |
Private Attributes | |
| F | f_ |
Rule adapter for History_Cell<State, Depth>.
The wrapped functor can be written in one of three convenient forms:
F(const History_Cell<State, Depth>&, Neighbor_View<Cell>) -> StateF(State current, const History_Cell<State, Depth>&, Neighbor_View<Cell>) -> StateF(State current, State previous) -> StateThe adapter pushes the returned base value into the cell ring and returns the updated History_Cell. A functor that already returns a full History_Cell with signature F(const Cell&, Neighbor_View<Cell>) -> Cell is also accepted.
| Depth | number of historical slots retained per cell. |
| F | wrapped transition functor. |
Definition at line 769 of file tpl_ca_continuous_rules.H.
|
inlineexplicit |
Construct a history rule from a functor.
| [in] | func | transition functor. |
| Any | exception thrown while moving/copying func. |
Definition at line 781 of file tpl_ca_continuous_rules.H.
|
inline |
Compute the next history-bearing cell state.
| State | base value stored in the history. |
| [in] | current | current history cell. |
| [in] | neighbours | neighbour history cells. |
| Any | exception thrown by the wrapped functor. |
Definition at line 792 of file tpl_ca_continuous_rules.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::History_Cell< State, Depth >::current(), Aleph::CA::History_Rule< Depth, F >::f_, Aleph::next(), Aleph::CA::History_Cell< State, Depth >::previous(), and Aleph::CA::History_Cell< State, Depth >::push().
Definition at line 773 of file tpl_ca_continuous_rules.H.
Referenced by Aleph::CA::History_Rule< Depth, F >::operator()().