diff options
Diffstat (limited to 'LeanAStar/Basic.lean')
| -rw-r--r-- | LeanAStar/Basic.lean | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LeanAStar/Basic.lean b/LeanAStar/Basic.lean index a2920f1..f4b972e 100644 --- a/LeanAStar/Basic.lean +++ b/LeanAStar/Basic.lean @@ -143,7 +143,7 @@ protected instance {α : Type u} [AStarNode α Costs] [LawfulBEq α] : LawfulBEq def findLowestCosts {α : Type u} [AStarNode α Costs] [Add Costs] [LawfulBEq α] (starts : List (StartPoint (α := α))) : Option Costs := let openSet := BinaryHeap.ofList ⟨OpenSetEntry.le_trans, OpenSetEntry.le_total⟩ $ starts.map λ{start, initial_costs}↦ {node := start, accumulated_costs := initial_costs, estimated_total_costs:= AStarNode.remaining_costs_heuristic start : LeanAStar.OpenSetEntry α} - LeanAStar.findPath_Aux openSet Std.HashSet.empty + LeanAStar.findPath_Aux openSet Std.HashSet.emptyWithCapacity /-- Helper to not only get the lowest costs, but also the shortest path. Could be implemented more efficient. -/ def findShortestPath {α : Type u} [AStarNode α Costs] [Add Costs] [LawfulBEq α] (starts : List (StartPoint (α := α))) : Option (Costs × List α) := |
