ngraph.modularity
v1.0.5
Published
modularity gephi js adoptation
Downloads
22
Maintainers
Readme
Modularity
Community detection algorithm based on graph modularity metric. It is code adaptation of Gephi Modularity.java to javascript.
usage
var dot = require('ngraph.fromdot')
, Modularity = require('../Modularity')
, centrality = require('ngraph.centrality')
;
var g = dot('digraph G { a -> b; b -> c; c -> a; a -> d; d -> e; e -> f; f -> d; f -> g; g -> e; }');
var modularity = new Modularity;
var communities = modularity.execute(g);
console.dir(communities);
install
With npm:
npm install ngraph.modularity --save
license
MIT