Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Vertex< V > Class Template Reference

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.
 
VData ()
 Get a mutable reference to the user information.
 
const VData () 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< VNullVertex
 An invalid vertex.
 

Detailed Description

template<typename V>
class ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Vertex< V >

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.

Constructor & Destructor Documentation

◆ Vertex()

template<typename V >
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Vertex< V >::Vertex ( const std::string & _name,
const V & _data = V(),
const VertexId _id = kNullId )
inline

Constructor.

Parameters
[in]_nameNon-unique vertex name.
[in]_dataUser information.
[in]_idOptional unique id.

Member Function Documentation

◆ Data() [1/2]

Get a mutable reference to the user information.

Returns
Mutable reference to the user information.

◆ Data() [2/2]

Retrieve the user information.

Returns
Reference to the user information.

◆ Id()

Get the vertex Id.

Returns
The vertex Id.

◆ Name()

template<typename V >
std::string ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::Vertex< V >::Name ( ) const
inline

Get the vertex name.

Returns
The vertex name.

◆ Valid()

Whether the vertex is considered valid or not (id==kNullId).

Returns
True when the vertex is valid or false otherwise (id==kNullId)

References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::graph::kNullId.

Member Data Documentation

◆ NullVertex

An invalid vertex.


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