33 #ifndef ISOEX_EDGE2VERTEXMAPT_HH
34 #define ISOEX_EDGE2VERTEXMAPT_HH
57 template <
class Po
intIdx,
class VertexHandle>
70 void insert(PointIdx _p0, PointIdx _p1, VertexHandle _vhnd)
72 map_[EdgeKey(_p0, _p1)] = _vhnd;
76 VertexHandle
find(PointIdx _p0, PointIdx _p1)
const
78 MyMapIterator it = map_.find(EdgeKey(_p0, _p1));
79 if (it != map_.end())
return it->second;
80 else return VertexHandle();
90 EdgeKey(PointIdx _p0, PointIdx _p1) {
91 if (_p0 < _p1) { p0_ = _p0; p1_ = _p1; }
92 else { p0_ = _p1; p1_ = _p0; }
95 bool operator<(
const EdgeKey& _rhs)
const
98 return (p0_ < _rhs.p0_);
100 return (p1_ < _rhs.p1_);
108 typedef std::map<EdgeKey, VertexHandle> MyMap;
109 typedef typename MyMap::const_iterator MyMapIterator;
118 #endif // ISOEX_EDGE2VERTEXMAPT_HH defined
Edge2VertexMapT()
Constructor.
Definition: Edge2VertexMapT.hh:63
Definition: Edge2VertexMapT.hh:58
Definition: EdgeKey.hh:14
VertexHandle find(PointIdx _p0, PointIdx _p1) const
Get vertex handle from map. Returns invalid handle if not found.
Definition: Edge2VertexMapT.hh:76
void insert(PointIdx _p0, PointIdx _p1, VertexHandle _vhnd)
Store vertex in map.
Definition: Edge2VertexMapT.hh:70
void clear()
clear the map
Definition: Edge2VertexMapT.hh:67
A type for volume images, or 3D textures.