A vertex of a graph. More...
#include <Vertex.hh>
Public Member Functions | |
Vertex (const std::string &_name, const V &_data=V(), const VertexId _id=kNullId) | |
Constructor. | |
V & | Data () |
Get a mutable reference to the user information. | |
const V & | Data () const |
Retrieve the user information. | |
VertexId | Id () const |
Get the vertex Id. | |
std::string | Name () const |
Get the vertex name. | |
bool | Valid () const |
Whether the vertex is considered valid or not (id==kNullId). | |
Static Public Attributes | |
static Vertex< V > | NullVertex |
An invalid vertex. | |
A vertex of a graph.
It stores user information, an optional name, and keeps an internal unique Id. This class does not enforce to choose a unique name.
|
inline |
Constructor.
[in] | _name | Non-unique vertex name. |
[in] | _data | User information. |
[in] | _id | Optional unique id. |
|
inline |
Get a mutable reference to the user information.
|
inline |
Retrieve the user information.
|
inline |
Get the vertex Id.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, EdgeType >::AdjacentsFrom(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, EdgeType >::AdjacentsTo(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, EdgeType >::IncidentsFrom(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, EdgeType >::IncidentsTo(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, EdgeType >::InDegree(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, EdgeType >::OutDegree(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, EdgeType >::RemoveVertex().
|
inline |
Get the vertex name.
|
inline |
Whether the vertex is considered valid or not (id==kNullId).
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::kNullId.
|
static |
An invalid vertex.