LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

dijkstra

shortest path graph algorithm filter

TLDR

Compute shortest path from a source node in a graph
$ dijkstra -p [source_node] [input.dot]
copy
Output distance matrix for all pairs of nodes
$ dijkstra -d [input.dot]
copy
Write processed graph to output file
$ dijkstra [input.dot] -o [output.dot]
copy
Compute shortest paths and output to file
$ dijkstra -p [source_node] -o [output.dot] [input.dot]
copy

SYNOPSIS

dijkstra [options] [files]

DESCRIPTION

dijkstra is a specialized Graphviz filter implementing Dijkstra's shortest path algorithm for graph analysis. It reads graph descriptions in DOT format, computes shortest paths between nodes, and outputs modified graphs with calculated distances or path information.The tool can calculate distance matrices showing the shortest path length between all pairs of nodes in a graph. It modifies graph attributes to reflect path calculations, which can then be used by other Graphviz layout tools for visualization.This utility is part of the Graphviz suite and is primarily used for network analysis, routing problems, and graph algorithm research. It processes graphs with weighted edges and can output results in various formats compatible with other Graphviz tools.

PARAMETERS

-o file

Output file.
-p node
Set source node for shortest path computation.
-d
Output distance matrix.

INSTALL

sudo apt install graphviz
copy
sudo dnf install graphviz
copy
sudo pacman -S graphviz
copy
sudo apk add graphviz
copy
sudo zypper install graphviz
copy
brew install graphviz
copy
nix profile install nixpkgs#graphviz
copy

SEE ALSO

dot(1), neato(1), sfdp(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid