QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | List of all members
QgsGraph Class Reference

Mathematics graph representation. More...

#include <qgsgraph.h>

Public Member Functions

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

Detailed Description

Mathematics graph representation.

Definition at line 131 of file qgsgraph.h.

Constructor & Destructor Documentation

◆ QgsGraph()

QgsGraph::QgsGraph ( )

Definition at line 19 of file qgsgraph.cpp.

Member Function Documentation

◆ addArc()

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

add edge to a graph

Definition at line 29 of file qgsgraph.cpp.

◆ addVertex()

int QgsGraph::addVertex ( const QgsPoint pt)

add vertex to a grap

Definition at line 23 of file qgsgraph.cpp.

◆ arc()

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

return edge at index

Definition at line 50 of file qgsgraph.cpp.

◆ arcCount()

int QgsGraph::arcCount ( ) const

return edge count

Definition at line 60 of file qgsgraph.cpp.

◆ findVertex()

int QgsGraph::findVertex ( const QgsPoint pt) const

find vertex by point

Returns
vertex index

Definition at line 65 of file qgsgraph.cpp.

◆ vertex()

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

return vertex at index

Definition at line 45 of file qgsgraph.cpp.

◆ vertexCount()

int QgsGraph::vertexCount ( ) const

return vertex count

Definition at line 55 of file qgsgraph.cpp.


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