C++ implementation of Dijkstra's algorithm
https://vikman90.github.io/dijkstra
- C++ compiler (clang preferred).
- cmake 3.22 or above.
sudo apt install clang cmakecmake -B build -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=no
cmake --build build -j$(nproc)sudo cmake --install buildsudo xargs rm -v < build/install_manifest.txtrandom-graph [ SIZE [ CONNECTIONS ] ]
| Option | Description | Range | Default |
|---|---|---|---|
SIZE |
Number of nodes. | 0 < SIZE < 4294967295 |
100 |
CONNECTIONS |
Number of connections per node. | 0 < CONNECTIONS < 4294967295 |
3 |
dijkstra [ FILE ]
| Option | Description | Range | Default |
|---|---|---|---|
FILE |
Graph file. | File path | stdin |
random-graph 5 | dijkstraGenerating a random graph... [0 ms.] Running Dijkstra's algorithm... [0 ms.] → 0 [0] 2 → 1 [2.14492] 0 → 2 [0.671249] 0 → 3 [0.333003] 0 → 4 [1.7423]
cmake -B build -DCMAKE_CXX_COMPILER=clang++
cmake --build build -j$(nproc)
ctest --test-dir buildcmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build
clang-umlsudo add-apt-repository ppa:bkryza/clang-uml
sudo apt install clang-umlcmake -B build
cmake --build build --target docs- Doxygen
- Graphviz
sudo apt install doxygen graphviz