Louvain.js 281 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
'use strict';

// https://graphology.github.io/standard-library/communities-louvain

import louvain from 'graphology-communities-louvain';

export function _assign(graph, options) {
  louvain.assign(graph, {
    getEdgeWeight: 'weight',
10
    resolution: 0.8
11 12 13
  });
  return graph;
}