Easy3D 2.6.1
Loading...
Searching...
No Matches
Graph::Vertex Struct Reference

This type represents a vertex (internally it is basically an index). More...

#include <graph.h>

Inheritance diagram for Graph::Vertex:
Graph::BaseHandle

Public Member Functions

 Vertex (int _idx=-1)
 Default constructor (with invalid index).
 
std::ostream & operator<< (std::ostream &os) const
 Output operator.
 
- Public Member Functions inherited from Graph::BaseHandle
 BaseHandle (int _idx=-1)
 Constructor with index.
 
int idx () const
 Get the underlying index of this handle.
 
void reset ()
 Reset handle to be invalid (index=-1).
 
bool is_valid () const
 Return whether the handle is valid, i.e., the index is not equal to -1.
 
bool operator== (const BaseHandle &_rhs) const
 Equality operator.
 
bool operator!= (const BaseHandle &_rhs) const
 Inequality operator.
 
bool operator< (const BaseHandle &_rhs) const
 Less than operator useful for sorting handles.
 

Detailed Description

This type represents a vertex (internally it is basically an index).

See also
Edge
Examples
Tutorial_108_Graph/main.cpp, Tutorial_109_Graph_Connectivity/main.cpp, and Tutorial_110_Graph_Property/main.cpp.

Constructor & Destructor Documentation

◆ Vertex()

Vertex ( int _idx = -1)
inlineexplicit

Default constructor (with invalid index).

Parameters
_idxThe index of the vertex.

Member Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & os) const
inline

Output operator.

Parameters
osThe output stream.
Returns
The output stream.

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