import org.graphstream.graph.Graph;
import org.graphstream.graph.implementations.DefaultGraph;
import org.graphstream.stream.file.FileSource;
import org.graphstream.stream.file.FileSourceEdge;
import static org.graphstream.algorithm.Toolkit.*;

import java.io.IOException;
import java.util.Arrays;

public class AnalyseRI {

    public static void main(String[] args) throws IOException {
        Graph g = new DefaultGraph("g");
        FileSource fs = new FileSourceEdge();

        fs.addSink(g);

        try {
            fs.readAll("/home/bryan/IdeaProjects/TP2/src/fichier.txt");
        } catch( IOException e) {e.printStackTrace();}
        //System.out.println(g.getNodeCount());
        //System.out.println(g.getEdgeCount());
        //System.out.println(averageDegree(g));
        //System.out.println(averageClusteringCoefficient(g));
        //System.out.println(averageDegree(g)/g.getNodeCount());
        //System.out.println(isConnected(g));
        System.out.println(averageDegree(g)*2>Math.log(g.getNodeCount()));

    }
}
