- Notifications
You must be signed in to change notification settings - Fork 320
Closed
Description
Any interest in this feature? Basically, you can have a graph with different weights on locations. This would factor into the distance cost of a particular path and change the recommended path.
How what would the desired way to represent cost in the function call be?
Currently (1 is inaccessible, 0 is open):
var graph = new Graph([ [0,0,0,0], [1,0,0,1], [1,1,0,0] ]); Proposed (anything 0 is inaccessible, anything > 0 is a fixed cost based on the value - so a 2 node would simply add 2 onto the distance instead of 1):
var graph = new Graph([ [0,0,0,0], [1,0,0,2], [1,3.5,0,0] ]); Obviously this would break compatibility with the old implementation (since the meaning of walls change), but that could be documented for people updating.
Metadata
Metadata
Assignees
Labels
No labels