@@ -17,6 +17,16 @@ public static class DijkstraExtensions
1717 public static ShortestPathResult Dijkstra ( this IDijkstraGraph graph , uint from , uint to )
1818 => Dijkstra ( graph , from , to , Int32 . MaxValue ) ;
1919
20+ /// <summary>
21+ /// Get path from @from to @to
22+ /// </summary>
23+ /// <param name="graph">Source graph</param>
24+ /// <param name="from">Start node</param>
25+ /// <param name="to">End node</param>
26+ /// <returns>Value with path</returns>
27+ public static ShortestPathResult AStar ( this IDijkstraGraph graph , uint from , uint to , Func < uint , uint , int > heuristic )
28+ => AStar ( graph , from , to , heuristic , Int32 . MaxValue ) ;
29+
2030 /// <summary>
2131 /// Get path from @from to @to
2232 /// </summary>
@@ -29,5 +39,18 @@ public static ShortestPathResult Dijkstra(this IDijkstraGraph graph, uint from,
2939 {
3040 return ShortestPath . Dijkstra . GetShortestPath ( graph , from , to , depth ) ;
3141 }
42+
43+ /// <summary>
44+ /// Get path from @from to @to
45+ /// </summary>
46+ /// <param name="graph">Source graph</param>
47+ /// <param name="from">Start node</param>
48+ /// <param name="to">End node</param>
49+ /// <param name="depth">Depth of path</param>
50+ /// <returns>Value with path</returns>
51+ public static ShortestPathResult AStar ( this IDijkstraGraph graph , uint from , uint to , Func < uint , uint , int > heuristic , int depth )
52+ {
53+ return ShortestPath . AStar . GetShortestPath ( graph , from , to , heuristic , depth ) ;
54+ }
3255 }
3356}
0 commit comments