64 template <
typename Nbh>
65 void render(
const std::string & title,
const Nbh &
nh,
68 std::vector<Offset_Vec<2>>
offs;
69 nh.for_each_offset(center, [&](
const auto &
o) {
offs.push_back(
o); });
74 min_r = std::min<int>(
min_r,
static_cast<int>(
o[0]));
75 max_r = std::max<int>(
max_r,
static_cast<int>(
o[0]));
76 min_c = std::min<int>(
min_c,
static_cast<int>(
o[1]));
77 max_c = std::max<int>(
max_c,
static_cast<int>(
o[1]));
82 std::vector<std::string>
grid(
rows, std::string(
cols,
'.'));
87 std::cout <<
"\n=== " << title
88 <<
" (radius=" <<
nh.radius()
89 <<
", size=" <<
nh.size() <<
") ===\n";
90 for (
const auto & line :
grid)
91 std::cout <<
" " << line <<
'\n';
97 std::cout <<
"Aleph::CA — Phase 2 neighborhood catalogue\n";
98 std::cout <<
"==========================================\n";
107 render(
"Triangular_Neighborhood (even parity)",
109 render(
"Triangular_Neighborhood (odd parity)",
Common typedefs and tag types for the Cellular Automata module.
User-supplied list of offsets for arbitrary connectivity.
Six-neighbour hex pattern in axial coordinates over a 2D lattice.
Moore (Chebyshev) neighborhood of radius R in N dimensions.
Three edge-neighbours over a 2D lattice with parity coupling.
Von Neumann (L1) neighborhood of radius R in N dimensions.
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::array< ca_index_t, N > Coord_Vec
Default coordinate vector.
Coord_Vec< N > Offset_Vec
Default offset vector (aliases Coord_Vec).
Main namespace for Aleph-w library functions.
Neighborhoods catalogue for Aleph::CA.