57 template <
typename Boundary>
63 lat.
set({ i, j },
static_cast<int>(i * 10 + j));
70 template <
typename Lat>
73 std::cout <<
"\n=== " << title <<
" ===\n";
76 std::cout << std::setw(4) << j;
80 std::cout <<
" i=" << std::setw(2) << i <<
" ";
83 const int v =
lat.at_safe({ i, j });
86 std::cout << (
inside ?
'[' :
' ')
97 std::cout <<
"Aleph::CA — boundary policies side-by-side\n";
98 std::cout <<
"==========================================\n";
99 std::cout <<
"Centre lattice: 3x3 with cell(i,j) = i*10 + j.\n";
100 std::cout <<
"Brackets [..] mark cells inside the lattice;\n";
101 std::cout <<
"everything else is resolved by `at_safe` through\n";
102 std::cout <<
"the boundary policy.\n";
104 render(
"OpenBoundary (out-of-range = 0)",
107 render(
"ToroidalBoundary (wrap on each axis)",
110 render(
"ReflectiveBoundary (mirror, no repeat)",
113 render(
"ConstantBoundary<int, 99>",
Common typedefs and tag types for the Cellular Automata module.
Lattice that adds boundary-aware access on top of a storage.
void set(const coord_type &c, const state_type &v)
Strict write: throws if c is out of range.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
std::ptrdiff_t ca_index_t
Signed coordinate component used by lattices and neighborhoods.
Main namespace for Aleph-w library functions.
and
Check uniqueness with explicit hash + equality functors.
Cellular automata lattice with pluggable boundary policies.
Dense, contiguous storage for cellular automata cells (1D/2D/3D).