QgsGraphEdge class

This class implements a graph edge.

Constructors, destructors, conversion operators

QgsGraphEdge() defaulted
Constructor for QgsGraphEdge.

Public functions

auto cost(int strategyIndex) const -> QVariant
Returns edge cost calculated using specified strategy.
auto fromVertex() const -> int
Returns the index of the vertex at the start of this edge.
auto strategies() const -> QVector<QVariant>
Returns array of available strategies.
auto toVertex() const -> int
Returns the index of the vertex at the end of this edge.

Function documentation

QVariant QgsGraphEdge::cost(int strategyIndex) const

Returns edge cost calculated using specified strategy.

Parameters
strategyIndex strategy index

int QgsGraphEdge::fromVertex() const

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

int QgsGraphEdge::toVertex() const

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