|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
User-supplied list of offsets for arbitrary connectivity. More...
#include <tpl_ca_neighborhood.H>
Public Types | |
| using | coord_type = Coord_Vec< N > |
| Coordinate type accepted by for_each_offset. | |
Public Member Functions | |
| constexpr | Custom_Neighborhood (std::array< Offset_Vec< N >, K > os) |
Build a custom neighborhood from an std::array of offsets. | |
| constexpr | Custom_Neighborhood (const Offset_Vec< N >(&os)[K]) |
| Build a custom neighborhood from a braced offset list. | |
| constexpr std::size_t | radius () const noexcept |
| constexpr std::size_t | size () const noexcept |
| constexpr const std::array< Offset_Vec< N >, K > & | offsets () const noexcept |
| template<typename F > | |
| constexpr void | for_each_offset (const Coord_Vec< N > ¢er, F &&f) const |
| Apply a functor to each offset in the neighborhood. | |
Static Public Attributes | |
| static constexpr std::size_t | rank_v = N |
| Lattice dimension. | |
| static constexpr std::size_t | size_v = K |
| Number of neighbours. | |
| static constexpr std::size_t | radius_v = Radius |
| Compile-time radius (0 if unknown). | |
Private Attributes | |
| std::array< Offset_Vec< N >, K > | offs_ |
User-supplied list of offsets for arbitrary connectivity.
| N | lattice rank. |
| K | number of offsets (compile-time constant). |
| Radius | optional compile-time radius; 0 means unknown and radius() computes the actual Chebyshev radius. |
Definition at line 474 of file tpl_ca_neighborhood.H.
| using Aleph::CA::Custom_Neighborhood< N, K, Radius >::coord_type = Coord_Vec<N> |
Coordinate type accepted by for_each_offset.
Definition at line 489 of file tpl_ca_neighborhood.H.
|
inlineexplicitconstexpr |
Build a custom neighborhood from an std::array of offsets.
| os | offsets in the exact order exposed by for_each_offset(). |
Definition at line 495 of file tpl_ca_neighborhood.H.
|
inlineexplicitconstexpr |
Build a custom neighborhood from a braced offset list.
This overload keeps direct-list initialization such as Custom_Neighborhood<2, 3>({ Offset_Vec<2>{ ... }, ... }) unambiguous across GCC and Clang.
| os | offsets in the exact order exposed by for_each_offset(). |
Definition at line 505 of file tpl_ca_neighborhood.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::CA::Custom_Neighborhood< N, K, Radius >::offs_.
|
inlineconstexpr |
Apply a functor to each offset in the neighborhood.
| F | functor type. |
| [in] | center | the coordinate of the center cell. |
| [in] | f | functor to apply. |
Definition at line 544 of file tpl_ca_neighborhood.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::CA::Custom_Neighborhood< N, K, Radius >::offs_.
|
inlineconstexprnoexcept |
Definition at line 533 of file tpl_ca_neighborhood.H.
References Aleph::CA::Custom_Neighborhood< N, K, Radius >::offs_.
|
inlineconstexprnoexcept |
Definition at line 512 of file tpl_ca_neighborhood.H.
References k, N, Aleph::CA::Custom_Neighborhood< N, K, Radius >::offs_, and r.
|
inlineconstexprnoexcept |
Definition at line 527 of file tpl_ca_neighborhood.H.
|
private |
Definition at line 479 of file tpl_ca_neighborhood.H.
Referenced by Aleph::CA::Custom_Neighborhood< N, K, Radius >::Custom_Neighborhood(), Aleph::CA::Custom_Neighborhood< N, K, Radius >::for_each_offset(), Aleph::CA::Custom_Neighborhood< N, K, Radius >::offsets(), and Aleph::CA::Custom_Neighborhood< N, K, Radius >::radius().
|
staticconstexpr |
Compile-time radius (0 if unknown).
Definition at line 487 of file tpl_ca_neighborhood.H.
|
staticconstexpr |
Lattice dimension.
Definition at line 483 of file tpl_ca_neighborhood.H.
|
staticconstexpr |
Number of neighbours.
Definition at line 485 of file tpl_ca_neighborhood.H.