Function dijkstra::dijkstra_path
[−]
[src]
pub fn dijkstra_path(matrix: &DMatrix<i32>,
start: usize,
end: usize)
-> (DVector<usize>, i32)
Calculates the minimum path using Dijkstra algorithm
Arguments
matrix
: a weight matrix (must be a square matrix)start
: the starting node for the pathend
: the end node for the path # Returns Tuple with two values- 0 - a DVector containing a list of nodes used to do the path, from start to the end
- 1 - an i32 with the minimum weight