Class: QgsGraphEdge

Represents an edge in a graph.

class qgis.analysis.QgsGraphEdge[source]

Bases: object

cost(self, strategyIndex: int) Any[source]

Returns edge cost calculated using specified strategy

Parameters:

strategyIndex (int) – strategy index

Return type:

Any

fromVertex(self) int[source]

Returns the index of the vertex at the start of this edge.

See also

toVertex()

Return type:

int

strategies(self) List[Any]

Returns array of available strategies

Return type:

List[Any]

toVertex(self) int[source]

Returns the index of the vertex at the end of this edge.

See also

fromVertex()

Return type:

int