QGIS API Documentation  2.99.0-Master (08ee180)
Public Member Functions | List of all members
QgsGraph Class Reference

Mathematical graph representation. More...

#include <qgsgraph.h>

Public Member Functions

 QgsGraph ()
 
int addEdge (int outVertexIdx, int inVertexIdx, const QVector< QVariant > &strategies)
 Add an edge to the graph. More...
 
int addVertex (const QgsPoint &pt)
 Add a vertex to the graph. More...
 
const QgsGraphEdgeedge (int idx) const
 Returns edge at given index. More...
 
int edgeCount () const
 Returns number of graph edges. More...
 
int findVertex (const QgsPoint &pt) const
 Find vertex by associated point. More...
 
const QgsGraphVertexvertex (int idx) const
 Returns vertex at given index. More...
 
int vertexCount () const
 Returns number of graph vertices. More...
 

Detailed Description

Mathematical graph representation.

Definition at line 130 of file qgsgraph.h.

Constructor & Destructor Documentation

QgsGraph::QgsGraph ( )

Definition at line 23 of file qgsgraph.cpp.

Member Function Documentation

int QgsGraph::addEdge ( int  outVertexIdx,
int  inVertexIdx,
const QVector< QVariant > &  strategies 
)

Add an edge to the graph.

Definition at line 33 of file qgsgraph.cpp.

int QgsGraph::addVertex ( const QgsPoint pt)

Add a vertex to the graph.

Definition at line 27 of file qgsgraph.cpp.

const QgsGraphEdge & QgsGraph::edge ( int  idx) const

Returns edge at given index.

Definition at line 54 of file qgsgraph.cpp.

int QgsGraph::edgeCount ( ) const

Returns number of graph edges.

Definition at line 64 of file qgsgraph.cpp.

int QgsGraph::findVertex ( const QgsPoint pt) const

Find vertex by associated point.

Returns
vertex index

Definition at line 69 of file qgsgraph.cpp.

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

Returns vertex at given index.

Definition at line 49 of file qgsgraph.cpp.

int QgsGraph::vertexCount ( ) const

Returns number of graph vertices.

Definition at line 59 of file qgsgraph.cpp.


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