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. |
References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::kNullId.
Referenced by operator<<.
|
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, UndirectedEdge< E > >::AdjacentsFrom(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, UndirectedEdge< E > >::AdjacentsTo(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, UndirectedEdge< E > >::IncidentsFrom(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, UndirectedEdge< E > >::IncidentsTo(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, UndirectedEdge< E > >::InDegree(), operator<<, ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, UndirectedEdge< E > >::OutDegree(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, UndirectedEdge< E > >::RemoveVertex().
|
inline |
|
inline |
Whether the vertex is considered valid or not (id==kNullId).
|
static |
An invalid vertex.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, UndirectedEdge< E > >::AddVertex(), ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, UndirectedEdge< E > >::VertexFromId(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Graph< V, E, UndirectedEdge< E > >::VertexFromId().