56 constexpr std::size_t
HALO = 2;
59 template <
typename Boundary>
67 g.
set({ i, j },
static_cast<int>(i * 10 + j));
73 template <
typename Boundary>
74 void render(
const std::string &name,
80 std::cout <<
"\n=== " << name <<
" ===\n";
88 std::cout << std::setw(3) << g.at_safe({ i, j }) <<
' ';
91 if (i == -1
or i == n - 1)
105 "Ghost_Lattice boundary showcase\n"
106 "-------------------------------\n"
107 "Interior is a 4x4 lattice with cells = i*10 + j (00,01,... ,33).\n"
108 "Halo thickness is 2, so you see a 2-cell ring around the interior.\n"
109 "Vertical bars mark the user-visible borders on axis 1.\n";
111 render(
"OpenBoundary (halo = 0)",
113 render(
"ConstantBoundary<99> (Dirichlet)",
115 render(
"NeumannBoundary (clamp to border)",
117 render(
"PeriodicBoundary (toroidal wrap)",
119 render(
"ReflectiveBoundary (mirror at edge)",
Common typedefs and tag types for the Cellular Automata module.
Row-major dense storage for N-dimensional cellular automata.
Lattice with Halo ghost layers around the user-visible cells.
void set(const coord_type &c, const state_type &v)
Strict write through a user coordinate.
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.
std::size_t ca_size_t
Unsigned size component used for extents and counts.
Main namespace for Aleph-w library functions.
Ghost-layer lattice for high-performance boundary handling.
Dense, contiguous storage for cellular automata cells (1D/2D/3D).