ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Edge Class Reference

Weighted graph edge. More...

Public Types

typedef std::pair< unsigned, unsigned > Key
 Unique edge key type. More...
 

Public Member Functions

 Edge ()
 
 Edge (const VertexIterator &A, unsigned _nearestPointIndex, float _nearestPointSquareDist)
 
bool operator< (const Edge &e) const
 
 Edge ()
 
 Edge (const VertexIterator &A, unsigned _nearestPointIndex, float _nearestPointSquareDist)
 
bool operator< (const Edge &e) const
 
 Edge (unsigned v1, unsigned v2, float weight)
 Default constructor. More...
 
bool operator< (const Edge &other) const
 Strict weak ordering operator (required by std::priority_queue) More...
 
const unsigned & v1 () const
 Returns first vertex (index) More...
 
const unsigned & v2 () const
 Returns second vertex (index) More...
 

Static Public Member Functions

static Key ConstructKey (unsigned v1, unsigned v2)
 Returns the unique key of an edge (no vertex order) More...
 

Public Attributes

VertexIterator itA
 
unsigned nearestPointIndex
 
float nearestPointSquareDist
 

Protected Attributes

Key m_key
 Unique key. More...
 
float m_weight
 Associated weight. More...
 

Detailed Description

Weighted graph edge.

Member Typedef Documentation

◆ Key

typedef std::pair<unsigned, unsigned> Edge::Key

Unique edge key type.

Constructor & Destructor Documentation

◆ Edge() [1/5]

Edge::Edge ( )
inline

◆ Edge() [2/5]

Edge::Edge ( const VertexIterator &  A,
unsigned  _nearestPointIndex,
float  _nearestPointSquareDist 
)
inline

◆ Edge() [3/5]

Edge::Edge ( )
inline

◆ Edge() [4/5]

Edge::Edge ( const VertexIterator &  A,
unsigned  _nearestPointIndex,
float  _nearestPointSquareDist 
)
inline

◆ Edge() [5/5]

Edge::Edge ( unsigned  v1,
unsigned  v2,
float  weight 
)
inline

Default constructor.

References m_weight.

Member Function Documentation

◆ ConstructKey()

static Key Edge::ConstructKey ( unsigned  v1,
unsigned  v2 
)
inlinestatic

Returns the unique key of an edge (no vertex order)

References cloudViewer::core::make_pair(), v1(), and v2().

Referenced by Graph::addEdge(), and Graph::weight().

◆ operator<() [1/3]

bool Edge::operator< ( const Edge &  e) const
inline

References e, and nearestPointSquareDist.

◆ operator<() [2/3]

bool Edge::operator< ( const Edge &  e) const
inline

References e.

◆ operator<() [3/3]

bool Edge::operator< ( const Edge &  other) const
inline

Strict weak ordering operator (required by std::priority_queue)

References m_weight.

◆ v1()

const unsigned& Edge::v1 ( ) const
inline

Returns first vertex (index)

References m_key.

Referenced by ConstructKey(), and ResolveNormalsWithMST().

◆ v2()

const unsigned& Edge::v2 ( ) const
inline

Returns second vertex (index)

References m_key.

Referenced by ConstructKey(), and ResolveNormalsWithMST().

Member Data Documentation

◆ itA

VertexIterator Edge::itA

◆ m_key

Key Edge::m_key
protected

Unique key.

Referenced by v1(), and v2().

◆ m_weight

float Edge::m_weight
protected

Associated weight.

Referenced by Edge(), and operator<().

◆ nearestPointIndex

unsigned Edge::nearestPointIndex

◆ nearestPointSquareDist

float Edge::nearestPointSquareDist

Referenced by operator<().


The documentation for this class was generated from the following files: