fix bug with value inserted into ValSet: before, the value inserted into the 'from' field was the ID of the current platform, but this is incorrect as it is circular. To fix, the 'from' field now contains the ID of the previous platform which this platform was found from
This commit is contained in:
@@ -133,11 +133,11 @@ end
|
||||
structure DistHeap =
|
||||
MakeSkewHeap
|
||||
(struct
|
||||
type t = {distance: int, id: int}
|
||||
type t = {distance: int, id: int, comesFrom: int}
|
||||
type id = int
|
||||
|
||||
(* default = defaultID returned when queue is empty *)
|
||||
val default = {distance = ~1, id = ~1}
|
||||
val default = {distance = ~1, id = ~1, comesFrom = ~1}
|
||||
|
||||
fun getID {id, distance = _} = id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user