markov-cluster
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -9,3 +9,4 @@ // Generated by CoffeeScript 1.10.0 | ||
function Nodes() { | ||
this.nodes = []; | ||
this.nodes = {}; | ||
this.id = 0; | ||
} | ||
@@ -20,3 +21,4 @@ | ||
} | ||
return this.nodes.push(name); | ||
this.id += 1; | ||
return this.nodes[name] = this.id; | ||
}; | ||
@@ -31,16 +33,12 @@ | ||
Nodes.prototype.getIdByName = function(name) { | ||
return this.nodes.indexOf(name); | ||
}; | ||
Nodes.prototype.size = function() { | ||
return this.nodes.length; | ||
return Object.keys(this.nodes).length; | ||
}; | ||
Nodes.prototype.exists = function(name) { | ||
return _.contains(this.nodes, name); | ||
return this.nodes[name] != null; | ||
}; | ||
Nodes.prototype.all = function() { | ||
return this.nodes; | ||
return Object.keys(this.nodes); | ||
}; | ||
@@ -47,0 +45,0 @@ |
{ | ||
"name": "markov-cluster", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "clustering graph network by Markov Cluster Algorithm(MCL)", | ||
@@ -5,0 +5,0 @@ "main": "lib/mcl.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
13603
380