class

Dijkstra::Graph(T)

Inherits Reference / Object

Constructors

new(directed : Bool = false)
Source

Instance methods

add_edge(source : T, target : T, weight : Int32)
Source
shortest_path(source : T, target : T) : Tuple(Int32, Array(T)) | Nil
Source
shortest_paths(source : T) : Array(Tuple(T, T, Int32 | Nil, Array(T) | Nil))
Source