Description Creating graphs Algorithms Visualization Detailed information
The shortestpath package provides a set of functions to execute and visualize algorithms that solve shortest path problems.
To create random graphs, which are neither too uniform nor too degenerated,
shortestpath's randomGraph
function can be used. This method generates a random graph
with the given number of nodes and average connectivity.
All shortest path algorithms also accept regular igraph graph objects as input.
The package implements the following algorithms:
Dijkstra (dijkstra
)
A* Search (aStarSearch
)
Bellman-Ford (bellmanFord
)
Floyd-Warshall (floydWarshall
)
R's builtin plot()
and print()
functions can be used to
visualize the results and intermediate steps of each algorithm.
There is a multitude of settings to configure plot visuals (see plot.spgraph
).
Moreover, the package also provides features to export the results to LaTeX tables (toLatexTable
)
and TikZ plots (toLatexGraph
).
A more detailed documentation of the package in the form of R vignette can be accessed by running browseVignettes("shortestpath")
.
See
vignette("p01-getting-started", package = "shortestpath")
for an introduction and initial overview,
vignette("p02-generating-graphs", package = "shortestpath")
for getting to know different functions to generate graphs,
vignette("p03-algorithms", package = "shortestpath")
for detailed information about each of the algorithm and how they differ,
vignette("p04-export", package = "shortestpath")
for becoming familiar with the packages's functions to visualize the optimization steps and
vignette("p05-data-structures", package = "shortestpath")
for learning more details about the structure and functions of spgraph and spresult objects
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.