33#include "qgis_analysis.h"
57 QVariant cost(
int strategyIndex )
const;
62 QVector< QVariant > strategies()
const;
74 int fromVertex()
const;
78 QVector< QVariant > mStrategies;
162 int addEdge(
int fromVertexIdx,
int toVertexIdx,
const QVector< QVariant > &strategies );
167 int vertexCount()
const;
184 if ( sipCpp->hasVertex( a0 ) )
186 return sipConvertFromNewType(
new QgsGraphVertex( sipCpp->vertex( a0 ) ), sipType_QgsGraphVertex, Py_None );
190 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
205 void removeVertex(
int index );
216 void removeVertex(
int index );
218 if ( sipCpp->hasVertex( a0 ) )
220 sipCpp->removeVertex( a0 );
224 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
233 int edgeCount()
const;
250 if ( sipCpp->hasEdge( a0 ) )
252 return sipConvertFromNewType(
new QgsGraphEdge( sipCpp->edge( a0 ) ), sipType_QgsGraphEdge, Py_None );
256 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
273 void removeEdge(
int index );
285 void removeEdge(
int index );
287 if ( sipCpp->hasEdge( a0 ) )
289 sipCpp->removeEdge( a0 );
293 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
318 int findOppositeEdge(
int index )
const;
334 int findOppositeEdge(
int index )
const;
336 if ( sipCpp->hasEdge( a0 ) )
338 sipRes = sipCpp->findOppositeEdge( a0 );
342 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
353 bool hasEdge(
int index )
const;
360 bool hasVertex(
int index )
const;
375 int mNextVertexId = 0;
This class implements a graph edge.
QgsGraphEdge()=default
Constructor for QgsGraphEdge.
This class implements a graph vertex.
QgsGraphVertex()=default
Default constructor.
Mathematical graph representation.
QHash< int, QgsGraphVertex > mGraphVertices
Graph vertices.
QHash< int, QgsGraphEdge > mGraphEdges
Graph edges.
QgsGraph()=default
Constructor for QgsGraph.
A class to represent a 2D point.
QList< int > QgsGraphEdgeIds