33#include "qgis_analysis.h"
56 QVariant cost(
int strategyIndex )
const;
61 QVector< QVariant > strategies()
const;
73 int fromVertex()
const;
77 QVector< QVariant > mStrategies;
159 int addEdge(
int fromVertexIdx,
int toVertexIdx,
const QVector< QVariant > &strategies );
164 int vertexCount()
const;
181 if ( sipCpp->hasVertex( a0 ) )
183 return sipConvertFromNewType(
new QgsGraphVertex( sipCpp->vertex( a0 ) ), sipType_QgsGraphVertex, Py_None );
187 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
202 void removeVertex(
int index );
213 void removeVertex(
int index );
215 if ( sipCpp->hasVertex( a0 ) )
217 sipCpp->removeVertex( a0 );
221 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
230 int edgeCount()
const;
247 if ( sipCpp->hasEdge( a0 ) )
249 return sipConvertFromNewType(
new QgsGraphEdge( sipCpp->edge( a0 ) ), sipType_QgsGraphEdge, Py_None );
253 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
270 void removeEdge(
int index );
282 void removeEdge(
int index );
284 if ( sipCpp->hasEdge( a0 ) )
286 sipCpp->removeEdge( a0 );
290 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
315 int findOppositeEdge(
int index )
const;
331 int findOppositeEdge(
int index )
const;
333 if ( sipCpp->hasEdge( a0 ) )
335 sipRes = sipCpp->findOppositeEdge( a0 );
339 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
350 bool hasEdge(
int index )
const;
357 bool hasVertex(
int index )
const;
372 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