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

Functions

template<typename State >
constexpr State invert (const State &s) noexcept
 Toggle a cell value between its zero and a non-zero counterpart.
 
template<typename State >
constexpr std::size_t popcount (const Block_2x2< State > &b) noexcept
 Population count of a 2×2 block: number of non-zero cells.
 

Function Documentation

◆ invert()

template<typename State >
constexpr State Aleph::CA::ca_block_rule_detail::invert ( const State &  s)
inlineconstexprnoexcept

Toggle a cell value between its zero and a non-zero counterpart.

Works for bool, integral types and small enums.

Definition at line 99 of file tpl_ca_block_rule.H.

References Aleph::blossom_maximum_cardinality_matching().

◆ popcount()

template<typename State >
constexpr std::size_t Aleph::CA::ca_block_rule_detail::popcount ( const Block_2x2< State > &  b)
inlineconstexprnoexcept

Population count of a 2×2 block: number of non-zero cells.

Definition at line 111 of file tpl_ca_block_rule.H.