Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphlib

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphlib - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

6

CHANGELOG.md

@@ -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 @@ ======

7

lib/alg/floydWarshall.js

@@ -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 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc