Some functions need to be factorized. But Ok, need some benchmarks (quality of partitions) with networkx or igraph.