Skip to content

Commit cee50b1

Browse files
committed
.net 4.0 support
1 parent 1de4719 commit cee50b1

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/Dijkstra.NET/Dijkstra.NET.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>netstandard1.3;net40</TargetFrameworks>
5-
<Version>1.0.7</Version>
5+
<Version>1.0.8</Version>
66
<Authors>Mateusz Mazurek</Authors>
77
<Company />
88
<Description>High performance the shortest path in directed graph with non negative weights algorithm implementation.</Description>

src/Samples/Dijkstra.Net40/Program.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using Dijkstra.NET.Contract;
1+
using System;
2+
using System.Linq;
3+
using Dijkstra.NET.Contract;
24
using Dijkstra.NET.Model;
35
using Dijkstra.NET.ShortestPath;
46

@@ -19,6 +21,19 @@ static void Main(string[] args)
1921
IShortestPathResult result = dijkstra.Process(0, 1); //result contains the shortest path
2022

2123
var path = result.GetPath();
24+
25+
graph.Reset();
26+
27+
var bfs = new BfsParallel<int, string>(graph);
28+
29+
IShortestPathResult bfsResult = bfs.Process(0, 1);
30+
31+
var bfsPath = bfsResult.GetPath();
32+
33+
if (!bfsPath.SequenceEqual(path))
34+
{
35+
throw new Exception("The path should be the same.");
36+
}
2237
}
2338
}
2439
}

0 commit comments

Comments
 (0)