package edu.claflin.finder.algo.clustering.struct.infomap_struct;

import edu.claflin.finder.algo.clustering.struct.louvain_struct.LouvainAlgorithm;
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 UndirectedTest {
    public static void main(String[] args) {
//        String fname = "undirected-3-module.txt"; // two_triangles.txt nine_triangles.txt undirected-3-module.txt
//        SimpleGraphIO sgio = new SimpleGraphIO();
//
//        Graph sourceGraph = sgio.parseGraph(new File("./Test Graphs/" + fname), true);
//        assert sourceGraph != null;
//
//        Graph g;
//        Map<Integer, List<Node>> modules;
//        RelativeUndirectedBitLength bitLengthCalculator;
//
//        g = sourceGraph.copy();
//        LouvainAlgorithm louvain = new LouvainAlgorithm(g);
//        modules = louvain.getCommunities();
//        bitLengthCalculator = new RelativeUndirectedBitLength(g, modules);
//        System.out.println("Avg Bit Length: " + bitLengthCalculator.calculateAvgBitLength());
    }
}
