|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Three edge-neighbours over a 2D lattice with parity coupling. More...
#include <tpl_ca_neighborhood.H>
Public Types | |
| using | coord_type = Coord_Vec< 2 > |
| Coordinate type accepted by for_each_offset. | |
Static Public Member Functions | |
| static constexpr std::size_t | radius () noexcept |
| Return the radius of the neighborhood (always 1). | |
| static constexpr std::size_t | size () noexcept |
| Return the number of neighbours (always 3). | |
| template<typename F > | |
| static constexpr void | for_each_offset (const Coord_Vec< 2 > ¢er, F &&f) |
| Apply a functor to the three parity-dependent triangle offsets. | |
Static Public Attributes | |
| static constexpr std::size_t | rank_v = 2 |
| Lattice dimension. | |
| static constexpr std::size_t | radius_v = 1 |
| Chebyshev radius (always 1). | |
| static constexpr std::size_t | size_v = 3 |
| Number of neighbours (always 3). | |
Three edge-neighbours over a 2D lattice with parity coupling.
Each cell is interpreted as a triangle whose orientation depends on (i + j) % 2. "Up" triangles (even parity) connect to (i, j-1), (i, j+1), (i+1, j); "down" triangles (odd parity) to (i, j-1), (i, j+1), (i-1, j). The third offset is therefore parity-dependent, so this class is the only one whose offsets cannot be cached as a static array.
Definition at line 416 of file tpl_ca_neighborhood.H.
Coordinate type accepted by for_each_offset.
Definition at line 426 of file tpl_ca_neighborhood.H.
|
inlinestaticconstexpr |
Apply a functor to the three parity-dependent triangle offsets.
| F | functor type. |
| [in] | center | the coordinate of the center cell; parity is derived from (center[0] + center[1]) & 1. |
| [in] | f | functor to apply to each Offset_Vec<2>. |
Definition at line 451 of file tpl_ca_neighborhood.H.
References Aleph::blossom_maximum_cardinality_matching().
|
inlinestaticconstexprnoexcept |
Return the radius of the neighborhood (always 1).
1. Definition at line 431 of file tpl_ca_neighborhood.H.
|
inlinestaticconstexprnoexcept |
Return the number of neighbours (always 3).
3. Definition at line 439 of file tpl_ca_neighborhood.H.
|
staticconstexpr |
Chebyshev radius (always 1).
Definition at line 422 of file tpl_ca_neighborhood.H.
|
staticconstexpr |
Lattice dimension.
Definition at line 420 of file tpl_ca_neighborhood.H.
|
staticconstexpr |
Number of neighbours (always 3).
Definition at line 424 of file tpl_ca_neighborhood.H.