|
VTK
9.7.20261111
|
#include <vtkStaticEdgeLocatorTemplate.h>
templated locator for managing edges and associated data on edges
vtkStaticEdgeLocatorTemplate is a vtkStaticElementLocator of EdgeTuple, the edges (v0,v1) with v0 < v1 and their data, with its former API: BuildLocator() then IsInsertedEdge() to search the unique edges, or MergeEdges() to group the identical edges, whose offsets give the number of unique edges and O(1) access to every group, e.g., to renumber duplicate edges or their data. The data of the edges is not used when comparing and sorting them.
Definition at line 42 of file vtkStaticEdgeLocatorTemplate.h.
Public Types | |
| using | EdgeTupleType = EdgeTuple<IDType, EdgeData> |
| The edges, and the element locator of the edges. | |
| using | Superclass = vtkStaticElementLocator<IDType, EdgeTupleType> |
| The edges, and the element locator of the edges. | |
| Public Types inherited from vtkStaticElementLocator< TId, EdgeTuple< TId, TData > > | |
| using | IDType |
| using | ElementType |
| using | KeysType |
| using | GroupedElements |
| The groups of equal elements of GroupElements(), see vtk::keys::GroupedElements. | |
Public Member Functions | |
| vtkStaticEdgeLocatorTemplate ()=default | |
| Construct an empty edge locator. | |
| ~vtkStaticEdgeLocatorTemplate ()=default | |
| IDType | GetNumberOfEdges () const |
| Return the number of unique edges, after BuildLocator(). | |
| const IDType * | MergeEdges (vtkIdType numEdges, EdgeTupleType *edgeArray, vtkIdType &numGroups) |
| Sort edgeArray so that identical edges are contiguous, and return the start of every group of identical edges, of size (numGroups + 1). | |
| IDType | IsInsertedEdge (IDType v0, IDType v1) const |
| Return the id of the edge (v0,v1), in any order, or a negative value if it was not inserted, after BuildLocator(). | |
| const EdgeTupleType & | GetEdge (IDType i) const |
| Return the ith unique edge, e.g., of a non-negative IsInsertedEdge(), 0 <= i < GetNumberOfEdges(). | |
| Public Member Functions inherited from vtkStaticElementLocator< TId, EdgeTuple< TId, TData > > | |
| vtkStaticElementLocator ()=default | |
| Construct an empty element locator. | |
| ~vtkStaticElementLocator ()=default | |
| vtkStaticElementLocator (vtkStaticElementLocator &&)=default | |
| Move a locator. | |
| vtkStaticElementLocator & | operator= (vtkStaticElementLocator &&)=default |
| vtkIdType | BuildLocator (vtkIdType numElements, ElementType *elementArray) |
| Build the locator from the numElements elements of elementArray, which may contain duplicates: the unique elements are moved to its front, sorted by key, see vtkKeys.h. | |
| IDType | IsInsertedElement (const ElementType &query) const |
| Return the id of an element, or a negative value if it was not inserted. | |
| IDType | IsInsertedElement (Arg0 &&arg0, Arg1 &&arg1, Args &&... args) const |
| Same as above, with the query constructed in place from its arguments, as emplace_back(), e.g., IsInsertedElement(v0, v1) for an element. | |
| IDType | GetNumberOfElements () const |
| Return the number of unique elements, after BuildLocator(). | |
| const ElementType & | GetElement (IDType i) const |
| Return the element of id i, i.e., the ith unique element, 0 <= i < GetNumberOfElements(). | |
| const GroupedElements & | GroupElements (vtkIdType numElements, ElementType *elementArray) |
| Sort the numElements elements of elementArray in place into groups of equal elements, and return them: group g is [GetGroupOffset(g), GetGroupOffset(g + 1)) of elementArray, the number of unique elements is GetNumberOfGroups(), and GetGroupOffset(GetNumberOfGroups()) is numElements. | |
Protected Attributes | |
| std::vector< IDType > | MergeOffsets |
| Protected Attributes inherited from vtkStaticElementLocator< TId, EdgeTuple< TId, TData > > | |
| IDType | NumElements |
| ElementType * | ElementArray |
| vtk::keys::ReducedKeys< KeysType > | Index |
| GroupedElements | Groups |
| using vtkStaticEdgeLocatorTemplate< IDType, EdgeData >::EdgeTupleType = EdgeTuple<IDType, EdgeData> |
The edges, and the element locator of the edges.
Definition at line 51 of file vtkStaticEdgeLocatorTemplate.h.
| using vtkStaticEdgeLocatorTemplate< IDType, EdgeData >::Superclass = vtkStaticElementLocator<IDType, EdgeTupleType> |
The edges, and the element locator of the edges.
Definition at line 52 of file vtkStaticEdgeLocatorTemplate.h.
|
default |
Construct an empty edge locator.
|
default |
|
inline |
Return the number of unique edges, after BuildLocator().
Definition at line 64 of file vtkStaticEdgeLocatorTemplate.h.
|
inline |
Sort edgeArray so that identical edges are contiguous, and return the start of every group of identical edges, of size (numGroups + 1).
The offsets are owned by the locator and remain valid until the next call of MergeEdges(). This does not affect BuildLocator().
Definition at line 74 of file vtkStaticEdgeLocatorTemplate.h.
|
inline |
Return the id of the edge (v0,v1), in any order, or a negative value if it was not inserted, after BuildLocator().
Definition at line 100 of file vtkStaticEdgeLocatorTemplate.h.
|
inline |
Return the ith unique edge, e.g., of a non-negative IsInsertedEdge(), 0 <= i < GetNumberOfEdges().
Definition at line 106 of file vtkStaticEdgeLocatorTemplate.h.
|
protected |
Definition at line 109 of file vtkStaticEdgeLocatorTemplate.h.