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

Connectivity pattern around a coordinate. More...

#include <tpl_ca_concepts.H>

Concept definition

template<typename H>
requires {
typename H::coord_type;
{ H::rank_v } -> std::convertible_to<std::size_t>;
{ H::size_v } -> std::convertible_to<std::size_t>;
}
and requires(const H &h, const typename H::coord_type &center) {
{ h.radius() } -> std::convertible_to<std::size_t>;
{ h.size() } -> std::convertible_to<std::size_t>;
h.for_each_offset(center, [](const auto &) {});
}
long double h
Definition btreepic.C:154
Connectivity pattern around a coordinate.
and
Check uniqueness with explicit hash + equality functors.

Detailed Description

Connectivity pattern around a coordinate.

A Neighborhood describes how to enumerate the cells that take part in the local transition for a given coordinate. The engine relies on the following interface:

  • coord_type — coordinate type accepted by enumeration.
  • rank_v — compile-time dimensionality.
  • size_v — compile-time number of offsets.
  • radius() — chebyshev or graph radius (≥ 1).
  • size() — number of neighbors enumerated at runtime.
  • for_each_offset(center, f) — invokes f(offset) for each neighbour offset around center.

Concrete neighborhoods (Moore, Von Neumann, custom offsets, ...) will be added in Phase 2; this concept fixes the contract relied on by the synchronous engine and neighbour gathering helpers.

Template Parameters
Hcandidate neighborhood type.

Definition at line 144 of file tpl_ca_concepts.H.