1.0.5 • Published 9 years ago

ngraph.modularity v1.0.5

Weekly downloads
11
License
MIT
Repository
github
Last release
9 years ago

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