Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Graph Class Reference

#include <Beobot/Graph.H>

Collaboration diagram for Graph:

Collaboration graph
[legend]
List of all members.

Detailed Description

basic graph class has all the access functions and shortest path no input/output file function because usually the file has to be filled with extra information

Definition at line 50 of file Graph.H.

Public Member Functions

Constructor, assigment and destructor
 Graph ()
 Constructor: generate a blank graph.
 Graph (std::vector< rutz::shared_ptr< Node > > nodes, std::vector< rutz::shared_ptr< Edge > > edges)
 Constructor: generate a graph with edges.
 ~Graph ()
 Destructor.
void addNode (rutz::shared_ptr< Node >)
 add edges and nodes
void addEdge (rutz::shared_ptr< Edge >)
Access functions
uint getNumNode ()
 get node and edge size
uint getNumEdge ()
rutz::shared_ptr< NodegetNode (uint index)
 get node or edge of the passed in index
rutz::shared_ptr< EdgegetEdge (uint index)
Compute functions
void computeAdjecencyList ()
 compute the adjecency list
void computeDistances ()
 compute all the shortcuts for shortest-distance related operations
float getDistance (uint a, uint b)
float getMaxDistance ()
rutz::shared_ptr< EdgegetEdge ()
 get edge where the point is at


Constructor & Destructor Documentation

Graph::Graph  ) 
 

Constructor: generate a blank graph.

Definition at line 43 of file Graph.C.

Graph::Graph std::vector< rutz::shared_ptr< Node > >  nodes,
std::vector< rutz::shared_ptr< Edge > >  edges
 

Constructor: generate a graph with edges.

Definition at line 53 of file Graph.C.

References i.

Graph::~Graph  ) 
 

Destructor.

Definition at line 70 of file Graph.C.


Member Function Documentation

void Graph::addNode rutz::shared_ptr< Node  ) 
 

add edges and nodes

Definition at line 74 of file Graph.C.

void Graph::computeAdjecencyList  ) 
 

compute the adjecency list

Definition at line 86 of file Graph.C.

References i, and LINFO.

void Graph::computeDistances  ) 
 

compute all the shortcuts for shortest-distance related operations

Definition at line 108 of file Graph.C.

References getDistance(), i, Image< T >::resize(), and Image< T >::setVal().

float Graph::getDistance uint  a,
uint  b
 

get the shortest distance from A to B using Dijkstra shortest-path algorithm

Definition at line 132 of file Graph.C.

References ASSERT, and i.

Referenced by computeDistances().

rutz::shared_ptr< Edge > Graph::getEdge  ) 
 

get edge where the point is at

Definition at line 212 of file Graph.C.

References i, and LFATAL.

float Graph::getMaxDistance  ) 
 

get the maximum distance of any 2 points in the map return -1.0F if the graph is unconnected

Definition at line 203 of file Graph.C.

References getMinMax(), rutz::max(), and rutz::min().

rutz::shared_ptr< Node > Graph::getNode uint  index  )  [inline]
 

get node or edge of the passed in index

Definition at line 145 of file Graph.H.

References ASSERT.

uint Graph::getNumNode  )  [inline]
 

get node and edge size

Definition at line 135 of file Graph.H.


The documentation for this class was generated from the following files:
Generated on Sat Nov 7 13:35:24 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4