Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal  1.4.2
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DGtal::HalfEdgeDataStructure::Edge Struct Reference

#include <DGtal/topology/HalfEdgeDataStructure.h>

Public Member Functions

VertexIndexstart ()
 
const VertexIndexstart () const
 
VertexIndexend ()
 
const VertexIndexend () const
 
 Edge ()
 
 Edge (VertexIndex vi, VertexIndex vj)
 
bool operator< (const Edge &other) const
 

Data Fields

VertexIndex v [2]
 The two vertex indices. More...
 

Detailed Description

Represents an unoriented edge as two vertex indices, the first lower than the second.

Definition at line 126 of file HalfEdgeDataStructure.h.

Constructor & Destructor Documentation

◆ Edge() [1/2]

DGtal::HalfEdgeDataStructure::Edge::Edge ( )
inline

Definition at line 137 of file HalfEdgeDataStructure.h.

138  {
139  v[0] = v[1] = -1;
140  }

◆ Edge() [2/2]

DGtal::HalfEdgeDataStructure::Edge::Edge ( VertexIndex  vi,
VertexIndex  vj 
)
inline

Definition at line 141 of file HalfEdgeDataStructure.h.

142  {
143  if ( vi <= vj ) { v[0] = vi; v[1] = vj; }
144  else { v[0] = vj; v[1] = vi; }
145  }

Member Function Documentation

◆ end() [1/2]

VertexIndex& DGtal::HalfEdgeDataStructure::Edge::end ( )
inline

Definition at line 134 of file HalfEdgeDataStructure.h.

134 { return v[1]; }

Referenced by operator<().

◆ end() [2/2]

const VertexIndex& DGtal::HalfEdgeDataStructure::Edge::end ( ) const
inline

Definition at line 135 of file HalfEdgeDataStructure.h.

135 { return v[1]; }

◆ operator<()

bool DGtal::HalfEdgeDataStructure::Edge::operator< ( const Edge other) const
inline

Definition at line 146 of file HalfEdgeDataStructure.h.

147  {
148  return ( start() < other.start() )
149  || ( ( start() == other.start() ) && ( end() < other.end() ) );
150  }

References end(), and start().

◆ start() [1/2]

VertexIndex& DGtal::HalfEdgeDataStructure::Edge::start ( )
inline

Definition at line 131 of file HalfEdgeDataStructure.h.

131 { return v[0]; }

Referenced by operator<().

◆ start() [2/2]

const VertexIndex& DGtal::HalfEdgeDataStructure::Edge::start ( ) const
inline

Definition at line 132 of file HalfEdgeDataStructure.h.

132 { return v[0]; }

Field Documentation

◆ v

VertexIndex DGtal::HalfEdgeDataStructure::Edge::v[2]

The two vertex indices.

Definition at line 129 of file HalfEdgeDataStructure.h.


The documentation for this struct was generated from the following file: