17#ifndef IGNITION_MATH_GRAPH_VERTEX_HH_
18#define IGNITION_MATH_GRAPH_VERTEX_HH_
28#include <ignition/math/config.hh>
35inline namespace IGNITION_MATH_VERSION_NAMESPACE
63 public:
Vertex(
const std::string &_name,
74 public:
const V &
Data()
const
95 public: std::string
Name()
const
115 _out <<
" " << _v.
Id() <<
" [label=\"" << _v.
Name()
116 <<
" (" << _v.
Id() <<
")\"];" << std::endl;
121 private: std::string name =
"";
139 std::map<VertexId, std::reference_wrapper<const Vertex<V>>>;
A vertex of a graph.
Definition Vertex.hh:55
friend std::ostream & operator<<(std::ostream &_out, const Vertex< V > &_v)
Stream insertion operator.
Definition Vertex.hh:112
std::string Name() const
Get the vertex name.
Definition Vertex.hh:95
V & Data()
Get a mutable reference to the user information.
Definition Vertex.hh:81
static Vertex< V > NullVertex
An invalid vertex.
Definition Vertex.hh:57
Vertex(const std::string &_name, const V &_data=V(), const VertexId _id=kNullId)
Constructor.
Definition Vertex.hh:63
const V & Data() const
Retrieve the user information.
Definition Vertex.hh:74
bool Valid() const
Whether the vertex is considered valid or not (id==kNullId).
Definition Vertex.hh:102
VertexId Id() const
Get the vertex Id.
Definition Vertex.hh:88
std::pair< VertexId, VertexId > VertexId_P
Definition Vertex.hh:45
static const VertexId kNullId
Represents an invalid Id.
Definition Vertex.hh:48
uint64_t VertexId
Definition Vertex.hh:41
std::map< VertexId, std::reference_wrapper< const Vertex< V > > > VertexRef_M
Definition Vertex.hh:138
static const uint64_t MAX_UI64
64bit unsigned integer maximum value
Definition Helpers.hh:328