# DijkstraTools 1.0.0

Dijkstra Algorithm Toolset For .NET
With this toolset you can calculate the shortest path from one vertex to another via edges within a graph.

`Install-Package DijkstraTools -Version 1.0.0`
`dotnet add package DijkstraTools --version 1.0.0`
`<PackageReference Include="DijkstraTools" Version="1.0.0" />`
For projects that support PackageReference, copy this XML node into the project file to reference the package.
`paket add DijkstraTools --version 1.0.0`

## Dijkstra Algorithm Toolset For .NET

With this toolset you can calculate the shortest path from one vertex to another via edges within a graph.

## Example usage

``````// Let's initialize a graph
Graph<string> graph = new Graph<string>();

// have values for the vertices ready
string one = "one";
string two = "two";
string three = "three";
string four = "four";
string five = "five";

// Create vertices of it
Vertex<string> vertexOne = new Vertex<string>(one);
Vertex<string> vertexTwo = new Vertex<string>(two);

// Or do so by adding values to the graph.

// Add edges (connections) between the vertices
Edge<string> edgeOneTwo = new Edge<string>(vertexOne, vertexTwo, 1);
Edge<string> edgeOneThree = new Edge<string>(vertexOne, vertexThree, 3);

// Or do so by adding edges to the graph directly
// AddEdge(start: Vertex<T>, end: Vertex<T>, weight: int, directed: bool, enabled: bool);

// Let's find a path
PathFinder<string> pathFinder = new PathFinder<string>(graph);
Path<string> path = pathFinder.FindPath(vertexOne, vertexFive);

// Path will be 1-3, 3-5 with a total weight of 8.
``````

## Dijkstra Algorithm Toolset For .NET

With this toolset you can calculate the shortest path from one vertex to another via edges within a graph.

## Example usage

``````// Let's initialize a graph
Graph<string> graph = new Graph<string>();

// have values for the vertices ready
string one = "one";
string two = "two";
string three = "three";
string four = "four";
string five = "five";

// Create vertices of it
Vertex<string> vertexOne = new Vertex<string>(one);
Vertex<string> vertexTwo = new Vertex<string>(two);

// Or do so by adding values to the graph.

// Add edges (connections) between the vertices
Edge<string> edgeOneTwo = new Edge<string>(vertexOne, vertexTwo, 1);
Edge<string> edgeOneThree = new Edge<string>(vertexOne, vertexThree, 3);

// Or do so by adding edges to the graph directly
// AddEdge(start: Vertex<T>, end: Vertex<T>, weight: int, directed: bool, enabled: bool);

// Let's find a path
PathFinder<string> pathFinder = new PathFinder<string>(graph);
Path<string> path = pathFinder.FindPath(vertexOne, vertexFive);

// Path will be 1-3, 3-5 with a total weight of 8.
``````

## Release Notes

First official release.

## Dependencies

• #### .NETStandard 2.0

• No dependencies.

## GitHub Usage

This package is not used by any popular GitHub repositories.