 |
VTK
9.1.0
|
Go to the documentation of this file.
63 #ifndef vtkStaticEdgeLocatorTemplate_h
64 #define vtkStaticEdgeLocatorTemplate_h
75 template <
typename TId,
typename TED>
92 if (this->V0 > this->V1)
94 std::swap(this->V0, this->V1);
114 return ((this->V0 == et.
V0 && this->V1 == et.
V1) ?
true :
false);
119 return ((this->V0 != et.
V0 || this->V1 != et.
V1) ?
true :
false);
126 return ((this->V0 == v0 && this->V1 == v1) ?
true :
false);
130 return ((this->V0 == v1 && this->V1 == v0) ?
true :
false);
136 if (this->V0 < tup.
V0)
138 if (tup.
V0 < this->V0)
140 if (this->V1 < tup.
V1)
150 template <
typename IDType,
typename EdgeData>
238 IDType curBin = this->
HashBin(V0);
242 for (IDType i = 0; i < num; ++i)
294 IDType
HashBin(IDType v)
const {
return ((v - this->MinV0) / this->NumEdgesPerBin); }
298 return (this->EdgeOffsets[bin + 1] - this->EdgeOffsets[bin]);
310 #include "vtkStaticEdgeLocatorTemplate.txx"
Definition of an edge tuple.
bool operator!=(const EdgeTuple &et) const
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,...
vtkIdType NumEdges
Some convenient typedefs.
bool operator==(const EdgeTuple &et) const
vtkStaticEdgeLocatorTemplate()
@)
EdgeTuple(TId v0, TId v1, TED data)
void Define(TId v0, TId v1)
EdgeTuple< IDType, EdgeData > EdgeTupleType
Some convenient typedefs.
EdgeTupleType * EdgeArray
Some convenient typedefs.
vtkIdType NumEdgesPerBin
Some convenient typedefs.
IDType * EdgeOffsets
Some convenient typedefs.
IDType IsInsertedEdge(IDType v0, IDType v1) const
Return the id of the edge indicated.
IDType MaxV0
Some convenient typedefs.
IDType GetNumberOfEdgesInBin(IDType bin) const
Some convenient typedefs.
std::vector< IDType > MergeOffsets
Some convenient typedefs.
IDType V0Range
Some convenient typedefs.
bool IsEdge(TId v0, TId v1) const
~vtkStaticEdgeLocatorTemplate()
Delete internal offset array.
bool operator<(const EdgeTuple &tup) const
const EdgeTupleType & GetEdge(IDType i) const
Return the ith edge in the edge array.
IDType MinV0
Some convenient typedefs.
vtkIdType BuildLocator(vtkIdType numEdges, EdgeTupleType *edgeArray)
This method constructs the edge locator to be used when searching for edges.
EdgeTupleType * MergeArray
Some convenient typedefs.
IDType GetNumberOfEdges()
Return the number of edges in the edge array.
int NDivs
Some convenient typedefs.
IDType HashBin(IDType v) const
Some convenient typedefs.