Skip to content

overwidee/deikstra-sharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deikstra-sharp

About

Algorithm Deikstra on C#. Finding the shortest path in a graph.

How to use

  1. Clone this repo:
$ git clone https://github.com/the-shichko/deikstra-sharp
  1. Declare object Deikstra
var deikstra = new Deikstra();
  1. Declare adjacency matrix in object
deikstra.Matrix = new decimal[4, 4]
            {
                { 0, 2, 5, 3 },
                { 3, 0, 5, 2 },
                { 3, 0, 0, 4 },
                { 3, 0, 0, 0 },
            };
  1. Start algorithm

Parameter - the number of the vertex from which to find the paths [0, size of matrix - 1]

var result = deikstra.Start(0);
  1. Result of method is array of weights

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages