44std::size_t population(
const Grid &frame)
46 std::size_t
count = 0;
48 for (
ca_size_t c = 0; c < frame.size(1); ++c)
49 if (frame.at({static_cast<ca_index_t>(r), static_cast<ca_index_t>(c)}) != 0)
67 const std::size_t start = population(
engine.frame());
73 std::cout <<
"Aleph-w consumer: Game of Life blinker\n"
74 <<
" population: " << start <<
" -> " <<
after_one
82 std::cerr <<
"consumer: blinker did not behave as a period-2 oscillator\n";
85 std::cout <<
" find_package(Aleph) integration OK\n";
Lattice that adds boundary-aware access on top of a storage.
state_type at(const coord_type &c) const
Strict access: throws if c is out of range.
Moore (Chebyshev) neighborhood of radius R in N dimensions.
Synchronous double-buffered engine.
const Lattice & frame() const noexcept
Return the current frame.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
constexpr Game_Of_Life_Rule make_game_of_life_rule() noexcept
Build the canonical Game of Life rule.
std::size_t ca_size_t
Unsigned size component used for extents and counts.
and
Check uniqueness with explicit hash + equality functors.
Itor::difference_type count(const Itor &beg, const Itor &end, const T &value)
Count elements equal to a value.
The lattice wraps around on every axis.
Synchronous double-buffered engine for cellular automata.
Cellular automata lattice with pluggable boundary policies.
Neighborhoods catalogue for Aleph::CA.
Rule mechanisms for Aleph::CA.
Dense, contiguous storage for cellular automata cells (1D/2D/3D).