150 int addEdge(
int fromVertexIdx,
int toVertexIdx,
const QVector<QVariant> &strategies );
172 if ( sipCpp->hasVertex( a0 ) )
174 return sipConvertFromNewType(
new QgsGraphVertex( sipCpp->vertex( a0 ) ), sipType_QgsGraphVertex, Py_None );
178 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
193 void removeVertex(
int index );
204 void removeVertex(
int index );
206 if ( sipCpp->hasVertex( a0 ) )
208 sipCpp->removeVertex( a0 );
212 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
221 int edgeCount()
const;
228 const QgsGraphEdge &edge(
int idx )
const;
236 QgsGraphEdge edge(
int idx )
const;
238 if ( sipCpp->hasEdge( a0 ) )
240 return sipConvertFromNewType(
new QgsGraphEdge( sipCpp->edge( a0 ) ), sipType_QgsGraphEdge, Py_None );
244 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
261 void removeEdge(
int index );
273 void removeEdge(
int index );
275 if ( sipCpp->hasEdge( a0 ) )
277 sipCpp->removeEdge( a0 );
281 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
291 int findVertex(
const QgsPointXY &pt )
const;
306 int findOppositeEdge(
int index )
const;
322 int findOppositeEdge(
int index )
const;
324 if ( sipCpp->hasEdge( a0 ) )
326 sipRes = sipCpp->findOppositeEdge( a0 );
330 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
341 bool hasEdge(
int index )
const;
348 bool hasVertex(
int index )
const;
361 int mNextVertexId = 0;
int addEdge(int fromVertexIdx, int toVertexIdx, const QVector< QVariant > &strategies)
Add an edge to the graph, going from the fromVertexIdx to toVertexIdx.