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

Mathematical graph representation. More...

#include <qgsgraph.h>

Public Member Functions

 QgsGraph ()=default
 Constructor for QgsGraph. More...
int addEdge (int outVertexIdx, int inVertexIdx, const QVector< QVariant > &strategies)
 Add an edge to the graph. More...
int addVertex (const QgsPointXY &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 QgsPointXY &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 131 of file qgsgraph.h.

Constructor & Destructor Documentation

◆ QgsGraph()

QgsGraph::QgsGraph ( )

Constructor for QgsGraph.

Member Function Documentation

◆ addEdge()

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

Add an edge to the graph.

Definition at line 29 of file qgsgraph.cpp.

◆ addVertex()

int QgsGraph::addVertex ( const QgsPointXY pt)

Add a vertex to the graph.

Definition at line 23 of file qgsgraph.cpp.

◆ edge()

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

Returns edge at given index.

Definition at line 50 of file qgsgraph.cpp.

◆ edgeCount()

int QgsGraph::edgeCount ( ) const

Returns number of graph edges.

Definition at line 60 of file qgsgraph.cpp.

◆ findVertex()

int QgsGraph::findVertex ( const QgsPointXY pt) const

Find vertex by associated point.

vertex index

Definition at line 65 of file qgsgraph.cpp.

◆ vertex()

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

Returns vertex at given index.

Definition at line 45 of file qgsgraph.cpp.

◆ vertexCount()

int QgsGraph::vertexCount ( ) const

Returns number of graph vertices.

Definition at line 55 of file qgsgraph.cpp.

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