Innovenergy_trunk/frontend/node_modules/graphlib/lib/alg/dijkstra-all.js

11 lines
262 B
JavaScript
Raw Permalink Normal View History

var dijkstra = require("./dijkstra");
var _ = require("../lodash");
module.exports = dijkstraAll;
function dijkstraAll(g, weightFunc, edgeFunc) {
return _.transform(g.nodes(), function(acc, v) {
acc[v] = dijkstra(g, v, weightFunc, edgeFunc);
}, {});
}