51 #ifndef vtkStaticEdgeLocatorTemplate_h
52 #define vtkStaticEdgeLocatorTemplate_h
54 #include "vtkABINamespace.h"
65 VTK_ABI_NAMESPACE_BEGIN
66 template <
typename TId,
typename TED>
83 if (this->V0 > this->V1)
85 std::swap(this->V0, this->V1);
111 return this->V0 == v0 && this->V1 == v1;
115 return this->V0 == v1 && this->V1 == v0;
121 if (this->V0 < tup.
V0)
123 if (tup.
V0 < this->V0)
125 if (this->V1 < tup.
V1)
135 template <
typename IDType,
typename EdgeData>
206 if (this->MinV0 < 0 || this->
MaxV0 < 0)
221 const IDType curBin = this->
HashBin(v0);
276 IDType
HashBin(IDType v)
const {
return ((v - this->MinV0) / this->NumEdgesPerBin); }
280 return (this->EdgeOffsets[bin + 1] - this->EdgeOffsets[bin]);
292 VTK_ABI_NAMESPACE_END
293 #include "vtkStaticEdgeLocatorTemplate.txx"
~vtkStaticEdgeLocatorTemplate()
Delete internal offset array.
bool IsEdge(TId v0, TId v1) const
IDType IsInsertedEdge(IDType v0, IDType v1) const
Return the id of the edge indicated.
Templated on types of ids defining an edge, and any data associated with the edge.
const IDType * MergeEdges(vtkIdType numEdges, EdgeTupleType *edgeArray, vtkIdType &numUniqueEdges)
This method sorts (in place) an array of EdgeTupleType (of length numEdges) into separate groups...
void Define(TId v0, TId v1)
vtkIdType NumEdgesPerBin
Some convenient typedefs.
const EdgeTupleType & GetEdge(IDType i) const
Return the ith edge in the edge array.
IDType GetNumberOfEdges()
Return the number of edges in the edge array.
vtkIdType NumEdges
Some convenient typedefs.
bool operator<(const EdgeTuple &tup) const
std::vector< IDType > MergeOffsets
Some convenient typedefs.
EdgeTuple< IDType, EdgeData > EdgeTupleType
Some convenient typedefs.
EdgeTupleType * EdgeArray
Some convenient typedefs.
EdgeTuple(TId v0, TId v1, TED data)
bool operator!=(const EdgeTuple &et) const
IDType MinV0
Some convenient typedefs.
vtkStaticEdgeLocatorTemplate()
@)
vtkIdType BuildLocator(vtkIdType numEdges, EdgeTupleType *edgeArray)
This method constructs the edge locator to be used when searching for edges.
IDType GetNumberOfEdgesInBin(IDType bin) const
Some convenient typedefs.
EdgeTupleType * MergeArray
Some convenient typedefs.
bool operator==(const EdgeTuple &et) const
Definition of an edge tuple.
IDType * EdgeOffsets
Some convenient typedefs.
int NDivs
Some convenient typedefs.
IDType V0Range
Some convenient typedefs.
IDType HashBin(IDType v) const
Some convenient typedefs.
IDType MaxV0
Some convenient typedefs.