Comparing version 0.3.0 to 0.3.1
@@ -0,1 +1,7 @@ | ||
v0.3.1 | ||
====== | ||
* @solleks fixed a bug in which `alg.floydWarshall` could return the wrong | ||
shortest path with multiple edges between the same nodes (#10). | ||
v0.3.0 | ||
@@ -2,0 +8,0 @@ ====== |
@@ -53,4 +53,7 @@ var Digraph = require("../Digraph"); | ||
var incidentNodes = g.incidentNodes(e), | ||
v = incidentNodes[0] !== u ? incidentNodes[0] : incidentNodes[1]; | ||
results[u][v] = { distance: weightFunc(e), predecessor: u }; | ||
v = incidentNodes[0] !== u ? incidentNodes[0] : incidentNodes[1], | ||
d = weightFunc(e); | ||
if (d < results[u][v].distance) { | ||
results[u][v] = { distance: d, predecessor: u }; | ||
} | ||
}); | ||
@@ -57,0 +60,0 @@ }); |
@@ -17,3 +17,3 @@ /*! | ||
/* | ||
* Constructor to create a new directed multi-graph. | ||
* Constructor to create a new undirected multi-graph. | ||
*/ | ||
@@ -20,0 +20,0 @@ function Graph() { |
@@ -1,1 +0,1 @@ | ||
module.exports = '0.3.0'; | ||
module.exports = '0.3.1'; |
{ | ||
"name": "graphlib", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "A directed and undirected multi-graph library", | ||
@@ -12,3 +12,6 @@ "main": "index.js", | ||
"pattern": "lib", | ||
"data-cover-never": ["node_modules", "test"] | ||
"data-cover-never": [ | ||
"node_modules", | ||
"test" | ||
] | ||
} | ||
@@ -15,0 +18,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58996
1556