#include <mrpt/math/graphs.h>
Public Types | |
typedef TYPE_EDGES | type_edges |
The type of the graph edges. | |
typedef std::map< std::pair < size_t, size_t >, TYPE_EDGES > | type_edges_map |
The type of the member "edges". | |
typedef type_edges_map::const_iterator | const_iterator |
typedef type_edges_map::iterator | iterator |
Public Member Functions | |
CDirectedGraph (const type_edges_map &obj) | |
Copy constructor from a map<pair< >, >. | |
CDirectedGraph () | |
Default constructor. | |
size_t | edgeCount () const |
The number of edges in the graph. | |
void | clearEdges () |
Erase all edges. | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
void | insertEdge (size_t from_nodeID, size_t to_nodeID, const TYPE_EDGES &edge_value) |
Insert an edge (from -> to) with the given edge value. | |
bool | edgeExists (size_t from_nodeID, size_t to_nodeID) const |
Test is the given directed edge exists. | |
TYPE_EDGES & | getEdge (size_t from_nodeID, size_t to_nodeID) |
Return a reference to the content of a given edge. | |
const TYPE_EDGES & | getEdge (size_t from_nodeID, size_t to_nodeID) const |
Return a reference to the content of a given edge. | |
void | eraseEdge (size_t from_nodeID, size_t to_nodeID) |
Erase a given edge (it has no effect if the edge didn't exist). | |
void | getAllNodes (std::set< size_t > &lstNode_IDs) const |
Return a list of all the node_ID's of the graph, generated from all the nodes that appear in the list of edges. | |
void | getNeighborsOf (const size_t nodeID, std::set< size_t > &neighborIDs) const |
Return the list of all neighbors of "nodeID", by creating a list of their node IDs. | |
Public Attributes | |
type_edges_map | edges |
The public member with the directed edges in the graph. |
This class only keeps a list of edges (in the member "edges"), so there is no information stored for each node but its existence referred by a node_ID.
Definition at line 46 of file graphs.h.
typedef type_edges_map::const_iterator mrpt::math::CDirectedGraph< TYPE_EDGES >::const_iterator |
typedef type_edges_map::iterator mrpt::math::CDirectedGraph< TYPE_EDGES >::iterator |
typedef TYPE_EDGES mrpt::math::CDirectedGraph< TYPE_EDGES >::type_edges |
typedef std::map< std::pair<size_t,size_t>, TYPE_EDGES > mrpt::math::CDirectedGraph< TYPE_EDGES >::type_edges_map |
mrpt::math::CDirectedGraph< TYPE_EDGES >::CDirectedGraph | ( | const type_edges_map & | obj | ) | [inline] |
mrpt::math::CDirectedGraph< TYPE_EDGES >::CDirectedGraph | ( | ) | [inline] |
const_iterator mrpt::math::CDirectedGraph< TYPE_EDGES >::begin | ( | ) | const [inline] |
iterator mrpt::math::CDirectedGraph< TYPE_EDGES >::begin | ( | ) | [inline] |
void mrpt::math::CDirectedGraph< TYPE_EDGES >::clearEdges | ( | ) | [inline] |
size_t mrpt::math::CDirectedGraph< TYPE_EDGES >::edgeCount | ( | ) | const [inline] |
bool mrpt::math::CDirectedGraph< TYPE_EDGES >::edgeExists | ( | size_t | from_nodeID, | |
size_t | to_nodeID | |||
) | const [inline] |
const_iterator mrpt::math::CDirectedGraph< TYPE_EDGES >::end | ( | ) | const [inline] |
iterator mrpt::math::CDirectedGraph< TYPE_EDGES >::end | ( | ) | [inline] |
Definition at line 64 of file graphs.h.
Referenced by mrpt::math::CDijkstra< TYPE_EDGES >::CDijkstra().
void mrpt::math::CDirectedGraph< TYPE_EDGES >::eraseEdge | ( | size_t | from_nodeID, | |
size_t | to_nodeID | |||
) | [inline] |
void mrpt::math::CDirectedGraph< TYPE_EDGES >::getAllNodes | ( | std::set< size_t > & | lstNode_IDs | ) | const [inline] |
Return a list of all the node_ID's of the graph, generated from all the nodes that appear in the list of edges.
Definition at line 107 of file graphs.h.
Referenced by mrpt::math::CDijkstra< TYPE_EDGES >::CDijkstra().
const TYPE_EDGES& mrpt::math::CDirectedGraph< TYPE_EDGES >::getEdge | ( | size_t | from_nodeID, | |
size_t | to_nodeID | |||
) | const [inline] |
TYPE_EDGES& mrpt::math::CDirectedGraph< TYPE_EDGES >::getEdge | ( | size_t | from_nodeID, | |
size_t | to_nodeID | |||
) | [inline] |
void mrpt::math::CDirectedGraph< TYPE_EDGES >::getNeighborsOf | ( | const size_t | nodeID, | |
std::set< size_t > & | neighborIDs | |||
) | const [inline] |
Return the list of all neighbors of "nodeID", by creating a list of their node IDs.
Definition at line 118 of file graphs.h.
Referenced by mrpt::math::CDijkstra< TYPE_EDGES >::CDijkstra().
void mrpt::math::CDirectedGraph< TYPE_EDGES >::insertEdge | ( | size_t | from_nodeID, | |
size_t | to_nodeID, | |||
const TYPE_EDGES & | edge_value | |||
) | [inline] |
type_edges_map mrpt::math::CDirectedGraph< TYPE_EDGES >::edges |
The public member with the directed edges in the graph.
Definition at line 55 of file graphs.h.
Referenced by mrpt::math::CDirectedGraph< CPOSE >::begin(), mrpt::math::CDijkstra< TYPE_EDGES >::CDijkstra(), mrpt::math::CDirectedGraph< CPOSE >::clearEdges(), mrpt::math::CDirectedGraph< CPOSE >::edgeCount(), mrpt::math::CDirectedGraph< CPOSE >::edgeExists(), mrpt::math::CDirectedGraph< CPOSE >::end(), mrpt::math::CDirectedGraph< CPOSE >::eraseEdge(), mrpt::math::CDirectedGraph< CPOSE >::getAllNodes(), mrpt::math::CDirectedGraph< CPOSE >::getEdge(), mrpt::math::CDirectedGraph< CPOSE >::getNeighborsOf(), and mrpt::math::CDirectedGraph< CPOSE >::insertEdge().
Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 22:58:25 EDT 2009 |