QgsGraph class
Mathematical graph representation.
Contents
Constructors, destructors, conversion operators
Public functions
- auto addEdge(int fromVertexIdx, int toVertexIdx, const QVector<QVariant>& strategies) -> int
- Add an edge to the graph, going from the fromVertexIdx to toVertexIdx.
- auto addVertex(const QgsPointXY& pt) -> int
- Add a vertex to the graph.
- auto edge(int idx) const -> const QgsGraphEdge&
- Returns edge at given index.
- auto edgeCount() const -> int
- Returns number of graph edges.
- auto findVertex(const QgsPointXY& pt) const -> int
- Find vertex by associated point.
- auto vertex(int idx) const -> const QgsGraphVertex&
- Returns vertex at given index.
- auto vertexCount() const -> int
- Returns number of graph vertices.
Function documentation
int QgsGraph:: findVertex(const QgsPointXY& pt) const
Find vertex by associated point.
| Returns | vertex index |
|---|