import org.graphstream.graph.Graph;
import org.graphstream.graph.implementations.SingleGraph;

import java.io.File;
import java.util.Locale;

/**
 * The goal of this class is to compute the correlation Dimension of the graph store in a dgs file
 *
 */
public class CorrelationDimension {

	/**
	 * The goal of the function is to add to the input argument graph g all the nodes present in the dgs file at the
	 * argument path.
	 *
	 * @param g graph to which we want to add the nodes
	 * @param path the path to the dgs file where the graph data is store
	 */
	public void add_node_to_graph_from_dgs_file(Graph g, String path) throws IOException {
		FileSource fs = new FileSourceDGS();

		fs.addSink(g);
		try {
			fs.begin(path);

			while (fs.nextEvents()) {
			}
		} catch( IOException e) {
			throw  new IOException(e);
		}
	}

	public static void main(String... args) {
		String path = args[0];
		if (path.endsWith("dgs")) {
			System.out.println("path : " + path);
			Graph g = new SingleGraph("graph_test");
		}
	}
}