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.1.4 to 1.1.5

Ospf/bm.coffee

10

Ospf/index.js

@@ -198,2 +198,5 @@ // Generated by CoffeeScript 1.10.0

shortestPathEdges = dijkstra_from.edgesTo(dst);
if (ld.isEmpty(shortestPathEdges)) {
continue;
}
dag = new Graph(ld.map(shortestPathEdges, (function(_this) {

@@ -243,9 +246,8 @@ return function(idx) {

({
Ospf: countDems = Ospf.countDems = countDems,
Ospf: demandsToDems = Ospf.demandsToDems = demandsToDems
});
Ospf.prototype.countDems = Ospf.countDems = countDems;
Ospf.prototype.demandsToDems = Ospf.demandsToDems = demandsToDems;
module.exports = Ospf;
}).call(this);

38

Ospf/test.js
// Generated by CoffeeScript 1.10.0
(function() {
var Graph, Ospf, circle, countDems, dds, dem_to_show, edge, edgeUtilization, generators, i, ld, len, o, ref, res_str, ring, size;
var Graph, Ospf, args, countDems, dds, dem_to_show, edge, edgeUtilization, g, generators, i, j, ld, len, len1, o, ref, ref1, ref2, res_str, ring, size, topo;

@@ -13,9 +13,3 @@ ld = require("lodash");

countDems = function(dems) {
return ld(dems).map(function(dests) {
return dests.length;
}).reduce(function(r, n) {
return r + n;
});
};
countDems = Ospf.countDems;

@@ -64,14 +58,20 @@ size = 80;

size = 60;
ref1 = [
{
topo: "circle",
args: [60]
}, {
topo: "grid",
args: [3, 5]
}
];
for (j = 0, len1 = ref1.length; j < len1; j++) {
ref2 = ref1[j], topo = ref2.topo, args = ref2.args;
g = new Graph(generators[topo].apply(generators, args));
console.log(" - " + topo + "(" + args + "), with " + (Object.keys(g.vertices).length) + " vertices and " + g.edges.length + " edges");
o = new Ospf(g);
console.log("Total number of demands: " + (countDems(o.dems)));
console.log(JSON.stringify(o.totalUtilization()));
}
circle = new Graph(generators.circle(size));
console.log("Circle(" + size + "), with " + (Object.keys(circle.vertices).length) + " vertices and " + circle.edges.length + " edges");
o = new Ospf(circle);
console.log("Total number of demands: " + (countDems(o.dems)));
console.log(JSON.stringify(o.totalUtilization()));
}).call(this);
{
"name": "libgraph",
"version": "1.1.4",
"version": "1.1.5",
"description": "graph lib in js/coffee",

@@ -5,0 +5,0 @@ "main": "Graph.js",

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