DijkstraSSSP: Dijkstra SSSP

Description Usage Arguments Details Value Note Author(s) References

View source: R/RcppExports.R

Description

Dijkstra's SSSP (Single source shortest path) algorithm:

gets the shortest path (geodesic distance) from source vertice(point) to all other vertices(points) defined by the edges of the adjasency matrix

Usage

1
DijkstraSSSP(Adj, Costs, source)

Arguments

Adj

[1:n,1:n] 0/1 adjascency matrix, e.g. from delaunay graph or gabriel graph

Costs

[1:n,1:n] matrix, distances between n points (normally euclidean)

source

int, vertice(point) from which to calculate the geodesic distance to all other points

Details

Preallocating space for DataStructures accordingly to the maximum possible number of vertices which is fixed set at the number 10001.

Value

ShortestPaths[1:n] vector, shortest paths (geodesic) to all other vertices including the source vertice itself

Note

runs in O(E*Log(V))

Author(s)

Michael Thrun

References

uses a changed code which is inspired by Shreyans Sheth 28.05.2015, see http://ideone.com/qkmt31


Mthrun/ProjectionBasedClustering documentation built on Feb. 18, 2020, 7:30 p.m.