/** * Generates a graph: in this case, reads it from the file * "samples/datasetsgraph/simple.net" * @return A sample undirected graph */ public static Graph getGraph() throws IOException { PajekNetReader pnr = new PajekNetReader(FactoryUtils.instantiateFactory(Object.class)); Graph g = new UndirectedSparseGraph(); pnr.load("src/main/resources/datasets/simple.net", g); return g; }
public static Graph getGraph(String FileName) throws IOException { PajekNetReader pnr = new PajekNetReader(FactoryUtils.instantiateFactory(Object.class)); Graph g = new UndirectedSparseGraph(); pnr.load(FileName, g); return g; }