Quantum GIS API Documentation  1.8
Public Member Functions | Private Attributes
QgsGraph Class Reference

Mathematics graph representation. More...

#include <qgsgraph.h>

List of all members.

Public Member Functions

 QgsGraph ()
 ~QgsGraph ()
int addVertex (const QgsPoint &pt)
 add vertex to a grap
int addArc (int outVertexIdx, int inVertexIdx, const QVector< QVariant > &properties)
 add edge to a graph
int vertexCount () const
 retrun vertex count
const QgsGraphVertexvertex (int idx) const
 return vertex at index
int arcCount () const
 retrun edge count
const QgsGraphArcarc (int idx) const
 retrun edge at index
int findVertex (const QgsPoint &pt) const
 find vertex by point

Private Attributes

QVector< QgsGraphVertexmGraphVertexes
QVector< QgsGraphArcmGraphArc

Detailed Description

Mathematics graph representation.

Definition at line 131 of file qgsgraph.h.


Constructor & Destructor Documentation

Definition at line 19 of file qgsgraph.cpp.

Definition at line 24 of file qgsgraph.cpp.


Member Function Documentation

int QgsGraph::addArc ( int  outVertexIdx,
int  inVertexIdx,
const QVector< QVariant > &  properties 
)
int QgsGraph::addVertex ( const QgsPoint pt)

add vertex to a grap

Definition at line 29 of file qgsgraph.cpp.

References mGraphVertexes.

Referenced by QgsGraphBuilder::addVertex(), and QgsGraphAnalyzer::shortestTree().

const QgsGraphArc & QgsGraph::arc ( int  idx) const

retrun edge at index

Definition at line 56 of file qgsgraph.cpp.

References mGraphArc.

Referenced by QgsGraphAnalyzer::dijkstra(), and QgsGraphAnalyzer::shortestTree().

int QgsGraph::arcCount ( ) const

retrun edge count

Definition at line 67 of file qgsgraph.cpp.

References mGraphArc.

int QgsGraph::findVertex ( const QgsPoint pt) const

find vertex by point

Returns:
vertex index

Definition at line 72 of file qgsgraph.cpp.

References mGraphVertexes.

const QgsGraphVertex & QgsGraph::vertex ( int  idx) const

return vertex at index

Definition at line 51 of file qgsgraph.cpp.

References mGraphVertexes.

Referenced by QgsGraphAnalyzer::dijkstra(), and QgsGraphAnalyzer::shortestTree().

int QgsGraph::vertexCount ( ) const

retrun vertex count

Definition at line 62 of file qgsgraph.cpp.

References mGraphVertexes.

Referenced by QgsGraphAnalyzer::dijkstra(), and QgsGraphAnalyzer::shortestTree().


Member Data Documentation

QVector<QgsGraphArc> QgsGraph::mGraphArc [private]

Definition at line 178 of file qgsgraph.h.

Referenced by addArc(), arc(), and arcCount().

Definition at line 176 of file qgsgraph.h.

Referenced by addArc(), addVertex(), findVertex(), vertex(), and vertexCount().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines