//package edu.claflin.finder.algo.clustering.struct.infomap_struct;
//
//import edu.claflin.finder.io.graph.SimpleGraphIO;
//import edu.claflin.finder.logic.Graph;
//import edu.claflin.finder.logic.Node;
//
//import java.io.File;
//import java.util.List;
//import java.util.Map;
//
//public class InfomapTester {
//    public static void main(String[] args) {
//
//        String fname = "nine_triangles.txt"; // two_triangles.txt nine_triangles.txt undirected-3-module.txt COAD.txt
//        SimpleGraphIO sgio = new SimpleGraphIO();
//
//        Graph sourceGraph = sgio.parseGraph(new File("./Test Graphs/" + fname), true);
//        assert sourceGraph != null;
//
//        Graph g = sourceGraph.copy();
//        final long startTime = System.currentTimeMillis();
//        Infomap infomap = new Infomap(g);
//        Map<Integer, List<Node>> communities = infomap.cluster();
//        double bitLength = infomap.getBestBitLength();
//
//        System.out.println("Communities count: " + communities.size());
//        System.out.println("Communities: " + communities);
//        System.out.println("Bit length: " + bitLength);
//        final long endTime = System.currentTimeMillis();
//        System.out.println("Total execution time: " + (endTime - startTime));
//    }
//}
