AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Represents a collection of neighbor relations between vertices. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/primal/geometry/Polyhedron.hpp>
Public Types | |
using | VertexNbrs = axom::StackArray< std::int8_t, MAX_NBRS_PER_VERT > |
Public Member Functions | |
NeighborCollection ()=default | |
Constructs an empty NeighborCollection. More... | |
AXOM_HOST_DEVICE void | clear () |
Clears the set of neighbors. More... | |
AXOM_HOST_DEVICE int | getNumNeighbors (int vtx) const |
Returns the number of neighbors of a given vertex. More... | |
AXOM_HOST_DEVICE const VertexNbrs & | operator[] (int vtx) const |
Gets the array of neighbors for a given vertex index vtx. More... | |
AXOM_HOST_DEVICE VertexNbrs & | operator[] (int vtx) |
Gets the array of neighbors for a given vertex index vtx. More... | |
AXOM_HOST_DEVICE const VertexNbrs & | getNeighbors (int vtx) const |
Gets the array of neighbors for a given vertex index vtx. More... | |
AXOM_HOST_DEVICE VertexNbrs & | getNeighbors (int vtx) |
Gets the array of neighbors for a given vertex index vtx. More... | |
AXOM_HOST_DEVICE void | addNeighbors (std::int8_t vtx, std::initializer_list< std::int8_t > nbrIds) |
Adds a set of neighbors to a given vertex. More... | |
AXOM_HOST_DEVICE void | addNeighbors (std::int8_t vtx, std::int8_t nbrId) |
Adds a single neighbor to a given vertex. More... | |
AXOM_HOST_DEVICE void | insertNeighborAtPos (std::int8_t vtx, std::int8_t nbr, std::int8_t pos) |
Inserts a new neighbor for a vertex at a given index in the neighbor list. More... | |
AXOM_HOST_DEVICE void | pruneNeighbors () |
Compacts all neighbor sets by removing neighbors with index -1. More... | |
Static Public Attributes | |
static constexpr int | MAX_VERTS = 32 |
static constexpr int | MAX_NBRS_PER_VERT = 8 |
Represents a collection of neighbor relations between vertices.
using axom::primal::NeighborCollection::VertexNbrs = axom::StackArray<std::int8_t, MAX_NBRS_PER_VERT> |
|
default |
Constructs an empty NeighborCollection.
|
inline |
Clears the set of neighbors.
References MAX_VERTS.
|
inline |
Returns the number of neighbors of a given vertex.
[in] | vtx | index of the vertex to check. |
References MAX_VERTS, and SLIC_ASSERT.
|
inline |
Gets the array of neighbors for a given vertex index vtx.
References getNeighbors(), MAX_VERTS, and SLIC_ASSERT.
|
inline |
Gets the array of neighbors for a given vertex index vtx.
References getNeighbors(), MAX_VERTS, and SLIC_ASSERT.
|
inline |
Gets the array of neighbors for a given vertex index vtx.
References MAX_VERTS, and SLIC_ASSERT.
|
inline |
Gets the array of neighbors for a given vertex index vtx.
References MAX_VERTS, and SLIC_ASSERT.
|
inline |
Adds a set of neighbors to a given vertex.
[in] | vtx | the index of the vertex to add new neighbors to |
[in] | nbr | a set of indices of neighboring vertices |
References MAX_NBRS_PER_VERT, MAX_VERTS, and SLIC_ASSERT.
|
inline |
Adds a single neighbor to a given vertex.
[in] | vtx | the index of the vertex to add the new neighbor to |
[in] | nbr | an index of a neighboring vertex |
References MAX_NBRS_PER_VERT, MAX_VERTS, and SLIC_ASSERT.
|
inline |
Inserts a new neighbor for a vertex at a given index in the neighbor list.
[in] | vtx | the index of the vertex to add a new neighbor to |
[in] | nbr | the index of the neighboring vertex |
[in] | pos | the position in the neighbor list to insert into |
References MAX_NBRS_PER_VERT, MAX_VERTS, and SLIC_ASSERT.
|
inline |
Compacts all neighbor sets by removing neighbors with index -1.
References MAX_VERTS.
|
staticconstexpr |
|
staticconstexpr |