DistanceVertex
public protocol DistanceVertex
A vertex that can keep track of its distance from another point in the graph.
-
A “pointer” to the parent in the search tree.
Declaration
Swift
associatedtype VertexId -
A measure of the distance within the graph.
Declaration
Swift
associatedtype Distance : AdditiveArithmetic, Comparable -
The distance from the start vertex (verticies).
Declaration
Swift
var distance: Distance { get set } -
The predecessor vertex.
Note
getis not used in most graph search algorithms, onlyset!Declaration
Swift
var predecessor: VertexId? { get set }
View on GitHub
DistanceVertex Protocol Reference