You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-24Lines changed: 7 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Dijkstra.NET Dijkstra algorithm in C#[](https://www.nuget.org/packages/Dijkstra.NET)
1
+
# Dijkstra.NET Dijkstra algorithm in C#[](https://www.nuget.org/packages/Dijkstra.NET)
2
2
3
3
Dijkstra algorithm which use priority queue thus complexity is equal O(ElogV) where E is number of edges and V is number of vertices. Used data structures are based on interfaces so you can implement your own or reused present. Simply example below. More information about algorithm you can find on [Wikipedia](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm).
4
4
@@ -23,22 +23,6 @@ graph.Connect(0, 1, 5, "some custom information in edge"); //First node has key
23
23
24
24
ShortestPathResultresult=graph.Dijkstra(0, 1); //result contains the shortest path
25
25
26
-
result.GetPath();
27
-
```
28
-
## Parallel version - obsolete
29
-
30
-
Library provide parallel version of finding the shortest path in graph, it uses [breadth-first search](https://en.wikipedia.org/wiki/Breadth-first_search) algorithm and Map-Reduce technics. Parallel version use all cores to find the shortest path thus processing cost is higher than classic way, however it can gives quicker result when dense graph with similar weights was processed. Simple example below.
31
-
32
-
```c#
33
-
vargraph=newGraph<int, string>();
34
-
35
-
graph.AddNode(1);
36
-
graph.AddNode(2);
37
-
38
-
graph.Connect(0, 1, 5, "some custom information in edge"); //First node has key equal 0
39
-
40
-
varbfs=newBfsParallel<int, string>(graph);
41
-
IShortestPathResultresult=bfs.Process(0, 1); //result contains the shortest path
42
26
result.GetPath();
43
27
```
44
28
@@ -50,18 +34,17 @@ For Graph where number of nodes is 10 000 000 and connections between them 1 000
0 commit comments