class Mazebot::Dijkstra

Defined in:

mazebot/dijkstra.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(graph : Mazebot::Graph, source_node : Mazebot::Node) #

[View source]

Instance Method Detail

def distance_to : Hash(Mazebot::Node, Float64) #

[View source]
def relax(from : Mazebot::Node, to : Mazebot::Node, weight : Float64) #

Edge relaxation basically means that we are checking if the shortest known path to a given node is still valid (i.e. we didn't find an even shorter path).


[View source]
def shortest_path_to(node : Mazebot::Node) #

[View source]
def update_distance_of_all_edges_to(distance : Float64) #

[View source]