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
In #106 and #107 the nextWeightFn was introduced.
The getPath function uses that function to calculate the weight of the path, but traverses it from destination to source. Then it reverses the node list before returning.
While traversing from destination to source is required (given the function input), calculating the weight of the path can be done after reversing the node list, leading to a much more natural understanding of the function's behavior.
I suggest we calculate the path's weight from source to destination using the node list, introduce a new parameter "nodes" which is the node list. The current "path" parameter is a more complex object. Maybe we should just change and give the node list for the "path" parameter.
Since the version is fresh I suggest we treat this as a bug fix.
In #106 and #107 the nextWeightFn was introduced.
The getPath function uses that function to calculate the weight of the path, but traverses it from destination to source. Then it reverses the node list before returning.
While traversing from destination to source is required (given the function input), calculating the weight of the path can be done after reversing the node list, leading to a much more natural understanding of the function's behavior.
I suggest we calculate the path's weight from source to destination using the node list, introduce a new parameter "nodes" which is the node list. The current "path" parameter is a more complex object. Maybe we should just change and give the node list for the "path" parameter.
Since the version is fresh I suggest we treat this as a bug fix.
@curran @ravann WDYT ?
The text was updated successfully, but these errors were encountered: