Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::Game_Of_Life_Functor Struct Reference

Functor implementing Conway's Game of Life canonical rule (B3/S23). More...

#include <tpl_ca_rule.H>

Public Member Functions

template<typename State >
constexpr State operator() (const State &current, const std::size_t alive) const noexcept
 Evaluate the B3/S23 transition.
 

Detailed Description

Functor implementing Conway's Game of Life canonical rule (B3/S23).

Definition at line 494 of file tpl_ca_rule.H.

Member Function Documentation

◆ operator()()

template<typename State >
constexpr State Aleph::CA::Game_Of_Life_Functor::operator() ( const State &  current,
const std::size_t  alive 
) const
inlineconstexprnoexcept

Evaluate the B3/S23 transition.

Template Parameters
Statecell state type.
Parameters
[in]currentcurrent centre-cell state.
[in]alivenumber of alive neighbours.
Returns
1 when the cell is alive in the next frame, else 0.
Exceptions
Thisfunction does not throw.

Definition at line 505 of file tpl_ca_rule.H.

References Aleph::and, and Aleph::blossom_maximum_cardinality_matching().


The documentation for this struct was generated from the following file: