YARP
Yet Another Robot Platform
yarp::manager::Graph Class Reference

Class Graph. More...

#include <yarp/manager/graph.h>

Public Member Functions

 Graph ()
 
virtual ~Graph ()
 
int getSize ()
 
NodegetNodeAt (int index)
 
NodeaddNode (Node *node)
 
bool removeNode (Node *node)
 
bool removeNode (const char *szLabel)
 
bool addLink (Node *first, Node *second, float weight, bool _virtual=false)
 
bool addLink (const char *szFirst, const char *szSecond, float weight, bool _virtual=false)
 
bool removeLink (Node *first, Node *second)
 
bool removeLink (const char *szFirst, const char *szSecond)
 
void clear ()
 
void setSatisfied (bool sat)
 
void setVisited (bool vis)
 
bool hasNode (Node *node)
 
bool hasNode (const char *szLabel)
 
NodegetNode (const char *szLabel)
 
GraphIterator begin ()
 
GraphIterator end ()
 

Detailed Description

Class Graph.

Definition at line 31 of file graph.h.

Constructor & Destructor Documentation

◆ Graph()

Graph::Graph ( )
default

◆ ~Graph()

Graph::~Graph ( )
virtual

Definition at line 15 of file graph.cpp.

Member Function Documentation

◆ addLink() [1/2]

bool Graph::addLink ( const char *  szFirst,
const char *  szSecond,
float  weight,
bool  _virtual = false 
)

Definition at line 96 of file graph.cpp.

◆ addLink() [2/2]

bool Graph::addLink ( Node first,
Node second,
float  weight,
bool  _virtual = false 
)

Definition at line 86 of file graph.cpp.

◆ addNode()

Node * Graph::addNode ( Node node)

Definition at line 20 of file graph.cpp.

◆ begin()

GraphIterator Graph::begin ( )

Definition at line 157 of file graph.cpp.

◆ clear()

void Graph::clear ( )

Definition at line 56 of file graph.cpp.

◆ end()

GraphIterator Graph::end ( )

Definition at line 164 of file graph.cpp.

◆ getNode()

Node * Graph::getNode ( const char *  szLabel)

Definition at line 78 of file graph.cpp.

◆ getNodeAt()

Node * Graph::getNodeAt ( int  index)

Definition at line 148 of file graph.cpp.

◆ getSize()

int yarp::manager::Graph::getSize ( )
inline

Definition at line 37 of file graph.h.

◆ hasNode() [1/2]

bool Graph::hasNode ( const char *  szLabel)

Definition at line 140 of file graph.cpp.

◆ hasNode() [2/2]

bool Graph::hasNode ( Node node)

Definition at line 130 of file graph.cpp.

◆ removeLink() [1/2]

bool Graph::removeLink ( const char *  szFirst,
const char *  szSecond 
)

Definition at line 118 of file graph.cpp.

◆ removeLink() [2/2]

bool Graph::removeLink ( Node first,
Node second 
)

Definition at line 109 of file graph.cpp.

◆ removeNode() [1/2]

bool Graph::removeNode ( const char *  szLabel)

Definition at line 46 of file graph.cpp.

◆ removeNode() [2/2]

bool Graph::removeNode ( Node node)

Definition at line 33 of file graph.cpp.

◆ setSatisfied()

void Graph::setSatisfied ( bool  sat)

Definition at line 64 of file graph.cpp.

◆ setVisited()

void Graph::setVisited ( bool  vis)

Definition at line 71 of file graph.cpp.


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