Quantum GIS API Documentation
1.8
|
Mathematics graph representation. More...
#include <qgsgraph.h>
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 QgsGraphVertex & | vertex (int idx) const |
return vertex at index | |
int | arcCount () const |
retrun edge count | |
const QgsGraphArc & | arc (int idx) const |
retrun edge at index | |
int | findVertex (const QgsPoint &pt) const |
find vertex by point | |
Private Attributes | |
QVector< QgsGraphVertex > | mGraphVertexes |
QVector< QgsGraphArc > | mGraphArc |
Mathematics graph representation.
Definition at line 131 of file qgsgraph.h.
Definition at line 19 of file qgsgraph.cpp.
Definition at line 24 of file qgsgraph.cpp.
int QgsGraph::addArc | ( | int | outVertexIdx, |
int | inVertexIdx, | ||
const QVector< QVariant > & | properties | ||
) |
add edge to a graph
Definition at line 35 of file qgsgraph.cpp.
References mGraphArc, mGraphVertexes, QgsGraphArc::mIn, QgsGraphArc::mOut, and QgsGraphArc::mProperties.
Referenced by QgsGraphBuilder::addArc(), and QgsGraphAnalyzer::shortestTree().
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 |
int QgsGraph::findVertex | ( | const QgsPoint & | pt | ) | const |
find vertex by point
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().
QVector<QgsGraphArc> QgsGraph::mGraphArc [private] |
Definition at line 178 of file qgsgraph.h.
Referenced by addArc(), arc(), and arcCount().
QVector<QgsGraphVertex> QgsGraph::mGraphVertexes [private] |
Definition at line 176 of file qgsgraph.h.
Referenced by addArc(), addVertex(), findVertex(), vertex(), and vertexCount().