ngraph.coarsen
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -16,3 +16,7 @@ var getSubgraph = require('ngraph.subgraph'); | ||
coarseGraph.forEachNode(function(node) { | ||
graphs.push(getSubgraph(node.data, srcGraph)); | ||
var subgraph = getSubgraph(node.data, srcGraph); | ||
graphs.push({ | ||
id: node.id, | ||
graph: subgraph | ||
}); | ||
}); | ||
@@ -19,0 +23,0 @@ |
{ | ||
"name": "ngraph.coarsen", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Given a community structure creates a coarse graph", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -171,4 +171,9 @@ var coarsen = require('../'); | ||
t.equals(allGraphs.length, 2, 'Two communities - two graphs'); | ||
allGraphs.forEach(function(record) { | ||
var node = coarseGraph.getNode(record.id); | ||
t.ok(node, 'Coarse node id is valid'); | ||
t.equals(node.data.size, record.graph.getNodesCount(), 'Number of nodes in subgraph is valid'); | ||
}); | ||
t.end(); | ||
}); |
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
10683
221