DijkstraAlgorithm 1.1.0
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package DijkstraAlgorithm --version 1.1.0
NuGet\Install-Package DijkstraAlgorithm -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DijkstraAlgorithm" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DijkstraAlgorithm" Version="1.1.0" />
<PackageReference Include="DijkstraAlgorithm" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DijkstraAlgorithm --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DijkstraAlgorithm, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DijkstraAlgorithm@1.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DijkstraAlgorithm&version=1.1.0
#tool nuget:?package=DijkstraAlgorithm&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Example Usage
// Create graph
var builder = new GraphBuilder();
builder
.AddNode("A")
.AddNode("B")
.AddNode("C")
.AddNode("D")
.AddNode("E");
builder
.AddBidirectionalLink("A", "B", 6)
.AddBidirectionalLink("A", "D", 1);
builder
.AddBidirectionalLink("B", "C", 5)
.AddBidirectionalLink("B", "D", 2)
.AddBidirectionalLink("B", "E", 2);
builder
.AddBidirectionalLink("C", "E", 5);
// Example of uni directional links
builder
.AddLink("D", "E", 1);
var graph = builder.Build();
// Create path finder
var pathFinder = new PathFinder(graph);
// Find path
const string origin = "A", destination = "C";
var path = pathFinder.FindShortestPath(
graph.Nodes.Single(node => node.Id == origin),
graph.Nodes.Single(node => node.Id == destination));
// Assert results
Assert.Equal(origin, path.Origin.Id);
Assert.Equal(destination, path.Destination.Id);
Assert.Equal(3, path.Segments.Count);
Assert.Equal(7, path.Segments.Sum(s => s.Weight));
Assert.Equal("A", path.Segments.ElementAt(0).Origin.Id);
Assert.Equal(1, path.Segments.ElementAt(0).Weight);
Assert.Equal("D", path.Segments.ElementAt(0).Destination.Id);
Assert.Equal("D", path.Segments.ElementAt(1).Origin.Id);
Assert.Equal(1, path.Segments.ElementAt(1).Weight);
Assert.Equal("E", path.Segments.ElementAt(1).Destination.Id);
Assert.Equal("E", path.Segments.ElementAt(2).Origin.Id);
Assert.Equal(5, path.Segments.ElementAt(2).Weight);
Assert.Equal("C", path.Segments.ElementAt(2).Destination.Id);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.1 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on DijkstraAlgorithm:
| Repository | Stars |
|---|---|
|
AlanMorel/MapleServer2
MapleStory 2 Emulator
|
|
|
MS2Community/Maple2
Server emulator for MapleStory2.
|
| Version | Downloads | Last Updated |
|---|