Examples of AdjacencyListGraph


Examples of org.graphstream.graph.implementations.AdjacencyListGraph

    // | |
    // g1 <-------/

    testGraphSyncBase(new MultiGraph("g1"), new MultiGraph("g2"));
    testGraphSyncBase(new SingleGraph("g1"), new SingleGraph("g2"));
    testGraphSyncBase(new AdjacencyListGraph("g1"), new AdjacencyListGraph(
        "g2"));
    testGraphSyncBase(new MultiGraph("g1"), new AdjacencyListGraph("g2"));
   
  }
View Full Code Here

Examples of org.graphstream.graph.implementations.AdjacencyListGraph

    testGraphSyncCycleSimple(new MultiGraph("g1"), new MultiGraph("g2"),
        new MultiGraph("g3"));
    testGraphSyncCycleSimple(new SingleGraph("g1"), new SingleGraph("g2"),
        new SingleGraph("g3"));
    testGraphSyncCycleSimple(new AdjacencyListGraph("g1"),
        new AdjacencyListGraph("g2"), new AdjacencyListGraph("g3"));
    testGraphSyncCycleSimple(new MultiGraph("g1"), new SingleGraph("g2"),
        new AdjacencyListGraph("g3"));
  }
View Full Code Here

Examples of org.graphstream.graph.implementations.AdjacencyListGraph

    testGraphSyncCycleProblem(new MultiGraph("g1"), new MultiGraph("g2"),
        new MultiGraph("g3"));
    testGraphSyncCycleProblem(new SingleGraph("g1"), new SingleGraph("g2"),
        new SingleGraph("g3"));
    testGraphSyncCycleProblem(new AdjacencyListGraph("g1"),
        new AdjacencyListGraph("g2"), new AdjacencyListGraph("g3"));
    testGraphSyncCycleProblem(new MultiGraph("g1"), new SingleGraph("g2"),
        new AdjacencyListGraph("g3"));
  }
View Full Code Here

Examples of org.graphstream.graph.implementations.AdjacencyListGraph

  @Before
  public void loadGraph() throws IOException {
    FileSourceDGS dgs = new FileSourceDGS();

    baseGraph = new AdjacencyListGraph("g");

    dgs.addSink(baseGraph);
    dgs.readAll(getClass().getResource("data/TestFilteredIterators.dgs"));
    dgs.removeSink(baseGraph);
  }
View Full Code Here

Examples of org.graphstream.graph.implementations.AdjacencyListGraph

//    String fileName = "/home/stefan/tmp/imdb/imdb-full.dgs";
//    String fileName = "/home/stefan/tmp/yoann/test_cleaned.dgs";
    int gCount = 2;
    Graph[] graphs = new Graph[gCount];
    graphs[0] = new SingleGraph("Single");
    graphs[2] = new AdjacencyListGraph("Adj");

    BenchPerformance[] tests = new BenchPerformance[gCount];
    for (int i = 0; i < gCount; i++) {
      System.out.println("Loading graph " + graphs[i].getId());
      tests[i] = new BenchPerformance(fileName, graphs[i]);
View Full Code Here

Examples of org.graphstream.graph.implementations.AdjacencyListGraph

      e.printStackTrace();
    }
  }

  public void testOne() throws IOException {
    Graph g = new AdjacencyListGraph("g");
    ThreadProxyPipe tpp = new ThreadProxyPipe();
    tpp.init(g);

    FileSinkDGS dgs1 = new FileSinkDGS();
    FileSinkDGS dgs2 = new FileSinkDGS();
    StringWriter w1 = new StringWriter();
    StringWriter w2 = new StringWriter();

    Actor a = new Actor(tpp);
    Thread t = new Thread(a);

    g.addSink(dgs1);
    tpp.addSink(dgs2);

    dgs1.begin(w1);
    dgs2.begin(w2);
View Full Code Here

Examples of org.graphstream.graph.implementations.AdjacencyListGraph

    }
  }
 
  @Test
  public void check() {
    AdjacencyListGraph g = new AdjacencyListGraph("test");
    g.addSink(new TestObject());
   
    g.addAttribute(GRAPH_BINDING_ATTR, GRAPH_BINDING_VALUE);
    g.addNode(NODE_ID).addAttribute(NODE_BINDING_ATTR, NODE_BINDING_VALUE);
    g.addNode("otherNode");
    g.addEdge(EDGE_ID, NODE_ID, "otherNode").addAttribute(EDGE_BINDING_ATTR, EDGE_BINDING_VALUE);
  }
View Full Code Here

Examples of org.graphstream.graph.implementations.AdjacencyListGraph

import static org.junit.Assert.fail;

public class TestFileSourceGEXF {

  protected Graph readRessource(String url) {
    Graph g = new AdjacencyListGraph(url);
    FileSourceGEXF gexf = new FileSourceGEXF();

    gexf.addSink(g);

    try {
View Full Code Here

Examples of org.graphstream.graph.implementations.AdjacencyListGraph

    }
  }

  @Test
  public void checkAdjacencyListGraph() {
    Graph g = new AdjacencyListGraph("g");

    g.setNodeFactory(new MyALGNodeFactory());
    g.setEdgeFactory(new MyALGEdgeFactory());

    new TestAddRemoveNode<MyALGNode>(g);
    new TestForEachNode<MyALGNode>(g);
    new TestNodeCollection<MyALGNode>(g);
    new TestAddRemoveEdge<MyALGEdge>(g);
View Full Code Here

Examples of org.graphstream.graph.implementations.AdjacencyListGraph

  protected File newTemporaryFile(String suffix) throws IOException {
    return File.createTempFile(getClass().getSimpleName(), suffix);
  }

  protected Graph getGraph(String resource) throws IOException {
    Graph g = new AdjacencyListGraph("test");
    FileSourceDGS in = new FileSourceDGS();

    in.addSink(g);
    in.readAll(getClass().getResourceAsStream(resource));
    in.removeSink(g);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.