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

Functions

constexpr std::size_t static_pow (std::size_t base, std::size_t exp) noexcept
 Compile-time integer power.
 
template<std::size_t N, std::size_t R>
constexpr std::size_t von_neumann_count () noexcept
 Number of integer points in the L1 ball of radius R in N dimensions, excluding the origin.
 
template<std::size_t N, std::size_t R>
constexpr auto compute_moore_offsets () noexcept
 Generate the canonical-ordered list of Moore offsets for N/R.
 
template<std::size_t N, std::size_t R>
constexpr auto compute_von_neumann_offsets () noexcept
 Generate the canonical-ordered list of Von Neumann offsets for N/R (L1 radius).
 

Function Documentation

◆ compute_moore_offsets()

template<std::size_t N, std::size_t R>
constexpr auto Aleph::CA::ca_neighborhood_detail::compute_moore_offsets ( )
constexprnoexcept

Generate the canonical-ordered list of Moore offsets for N/R.

Definition at line 140 of file tpl_ca_neighborhood.H.

References Aleph::blossom_maximum_cardinality_matching(), N, Aleph::CA::R, and static_pow().

◆ compute_von_neumann_offsets()

template<std::size_t N, std::size_t R>
constexpr auto Aleph::CA::ca_neighborhood_detail::compute_von_neumann_offsets ( )
constexprnoexcept

Generate the canonical-ordered list of Von Neumann offsets for N/R (L1 radius).

Same iteration as Moore but filtered.

Definition at line 182 of file tpl_ca_neighborhood.H.

References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), l1, N, Aleph::CA::R, and static_pow().

◆ static_pow()

constexpr std::size_t Aleph::CA::ca_neighborhood_detail::static_pow ( std::size_t  base,
std::size_t  exp 
)
constexprnoexcept

Compile-time integer power.

Definition at line 88 of file tpl_ca_neighborhood.H.

References exp(), and r.

Referenced by compute_moore_offsets(), compute_von_neumann_offsets(), and von_neumann_count().

◆ von_neumann_count()

template<std::size_t N, std::size_t R>
constexpr std::size_t Aleph::CA::ca_neighborhood_detail::von_neumann_count ( )
constexprnoexcept

Number of integer points in the L1 ball of radius R in N dimensions, excluding the origin.

Definition at line 99 of file tpl_ca_neighborhood.H.

References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), l1, N, Aleph::CA::R, and static_pow().