Java 类org.apache.commons.collections15.FactoryUtils 实例源码

项目:mdp-plan-revision    文件:SimpleGraphDraw.java   
/**
 * 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;
}
项目:de-anonymization    文件:MyGraph.java   
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;
}
项目:KBDeX    文件:SimpleGraphDraw.java   
/**
 * 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;
}
项目:t4f-data    文件:SimpleGraphDraw.java   
/**
 * 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;
}