dijkstra:在图上执行 Dijkstra 并返回最短路径的节点模块

时间:2024-07-13 15:23:04
【文件属性】:

文件名称:dijkstra:在图上执行 Dijkstra 并返回最短路径的节点模块

文件大小:7KB

文件格式:ZIP

更新时间:2024-07-13 15:23:04

JavaScript

迪杰斯特拉 节点模块在图形上执行 Dijkstra 并返回“最短”路径 用法 var DJ = require ( 'dijkstra' ) ; //create new DJ graph var graph = new DJ ( ) ; //add edges to the graph graph . addEdge ( from , to , weight ) ; // where weight of the edge is +ve //return shortest path between two nodes graph . search ( from , to ) ; ## Further details Check out the tests for more examples .


【文件预览】:
dijkstra-master
----lib()
--------index.js(1KB)
----gulpfile.js(353B)
----LICENSE(11KB)
----README.md(401B)
----tests()
--------dijkstra.spec.js(467B)
----.gitignore(493B)
----package.json(821B)

网友评论