dijkstra: Implement the dijkstra algorithm

Description Usage Arguments References

View source: R/Lab03.R

Description

The function returns the shortest path to every other node in graph from init_node.

Usage

1
dijkstra(graph, init_node)

Arguments

graph,

A data frame with three variables, v1, v2 and w that contains the edges of the graph (from v1 to v2) with the weight of the edge (w)

init_node,

A number.

References

More information of dijkstra algorithm here


atikh281/732A94_Lab03 documentation built on Nov. 3, 2019, 1:59 p.m.