JHF_Dijkstra-Algorithm_withUserH​andling

Versione 1.0 (14,5 KB) da Jacob Foster
Implementation of Dijkstra’s Algorithm with user handling
6 download
Aggiornato 25 feb 2023
If your graphical representation of your network is in 0...inf format then this code will be able to handle user inputs of 0...inf since MATLAB is in 1...inf format. The outputs are even converted back to 0...inf format for easy analysis with your visualization. If your graphical representation is in 1...inf then no actions/conversions are taken on the source and destination node.
The default node map***
(1,2) = distance from 0 to vertex #1 which equals 4
(2,8) = distance from 1 to vertex #7 which equals 11
This code also has extra features. This code will ask the user for the desired source node, destination node, and if the code should find the shortest distance to all nodes or just the destination node. One extra feature is checking for out of range source and destination nodes that the user inputs. The other feature is exit handling in case the user wants to exit the program after the program has been started. These features are mostly unnecessary for the Dijkstra’s Algorithm but have some utility.
The cost matrix can be changed and defined manually.

Cita come

Jacob Foster (2024). JHF_Dijkstra-Algorithm_withUserHandling (https://github.com/JHFoster11/JHF_Dijkstra-s-Algorithm/releases/tag/1.0), GitHub. Recuperato .

Compatibilità della release di MATLAB
Creato con R2021a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Tag Aggiungi tag
Riconoscimenti

Ispirato da: dijkstra very simple

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0

Per visualizzare o segnalare problemi su questo componente aggiuntivo di GitHub, visita GitHub Repository.
Per visualizzare o segnalare problemi su questo componente aggiuntivo di GitHub, visita GitHub Repository.