We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea929cc commit 88d1ee6Copy full SHA for 88d1ee6
src/Samples/Dijkstra.Net40/Program.cs
@@ -1,6 +1,7 @@
1
using System;
2
using System.Linq;
3
using Dijkstra.NET.Contract;
4
+using Dijkstra.NET.Extensions;
5
using Dijkstra.NET.Model;
6
using Dijkstra.NET.ShortestPath;
7
@@ -24,13 +25,15 @@ static void Main(string[] args)
24
25
26
graph.Reset();
27
28
+ var immutablePath = graph.Dijkstra(0, 1);
29
+
30
var bfs = new BfsParallel<int, string>(graph);
31
32
IShortestPathResult bfsResult = bfs.Process(0, 1);
33
34
var bfsPath = bfsResult.GetPath();
35
- if (!bfsPath.SequenceEqual(path))
36
+ if (!bfsPath.SequenceEqual(path) || !immutablePath.GetPath().SequenceEqual(path))
37
{
38
throw new Exception("The path should be the same.");
39
}
0 commit comments