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

libgraph

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libgraph - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

16

dijkstra/index.js

@@ -5,3 +5,3 @@ // Generated by CoffeeScript 1.10.0

PriorityQueue = require("js-priority-queue");
PriorityQueue = require("heap");

@@ -21,6 +21,4 @@ dijkstra = function(graph, weightFn) {

data = {};
pq = new PriorityQueue({
comparator: function(a, b) {
return a.distance - b.distance;
}
pq = new PriorityQueue(function(a, b) {
return a.distance - b.distance;
});

@@ -34,3 +32,3 @@ data[src] = {

i = ref[j];
pq.queue({
pq.push({
i: i,

@@ -40,4 +38,4 @@ distance: weightFn(edges[i])

}
while (pq.length > 0) {
elem = pq.dequeue();
while (pq.size() > 0) {
elem = pq.pop();
i = elem.i, distance = elem.distance;

@@ -53,3 +51,3 @@ v = edges[i].dst;

ee = ref1[k];
pq.queue({
pq.push({
i: ee,

@@ -56,0 +54,0 @@ distance: distance + weightFn(edges[ee])

@@ -7,3 +7,3 @@ // Generated by CoffeeScript 1.10.0

PriorityQueue = require("js-priority-queue");
PriorityQueue = require("heap");

@@ -188,13 +188,11 @@ Graph = require("../");

})(this), {});
pq = new PriorityQueue({
comparator: function(a, b) {
return a.distance - b.distance;
}
pq = new PriorityQueue(function(a, b) {
return a.distance - b.distance;
});
pq.queue({
pq.push({
node: src,
distance: 0
});
while (pq.length > 0) {
x = pq.dequeue();
while (pq.size() > 0) {
x = pq.pop();
demsPerEdge = {};

@@ -232,3 +230,3 @@ edgesPerDem = {};

};
pq.queue(newNode);
pq.push(newNode);
load[e_dst] = {};

@@ -235,0 +233,0 @@ }

{
"name": "libgraph",
"version": "1.2.6",
"version": "1.2.7",
"description": "graph lib in js/coffee",

@@ -31,3 +31,3 @@ "main": "Graph.js",

"dependencies": {
"js-priority-queue": "^0.1.3",
"heap": "^0.2.6",
"keep-n-first": "^1.0.0",

@@ -34,0 +34,0 @@ "rat.js": "^1.2.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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