Package org.graphstream.graph.implementations

Examples of org.graphstream.graph.implementations.AbstractGraph


    testBasic(new MultiGraph("M")); // XXX
  }

  @Test
  public void testReplay() {
    AbstractGraph g1 = new AdjacencyListGraph("g1");
    Graph g2 = new AdjacencyListGraph("g2");

    Node A1 = g1.addNode("A");
    Node B1 = g1.addNode("B");
    Node C1 = g1.addNode("C");

    Edge AB1 = g1.addEdge("AB", "A", "B");
    Edge BC1 = g1.addEdge("BC", "B", "C");
    Edge CA1 = g1.addEdge("CA", "C", "A");

    A1.addAttribute("string", "an example");
    B1.addAttribute("double", 42.0);
    C1.addAttribute("array", new int[] { 1, 2, 3 });

    AB1.addAttribute("string", "an example");
    BC1.addAttribute("double", 42.0);
    CA1.addAttribute("array", new int[] { 1, 2, 3 });

    Replayable.Controller controller = g1.getReplayController();
    controller.addSink(g2);
    controller.replay();

    Node A2 = g2.getNode("A");
    Node B2 = g2.getNode("B");
View Full Code Here

TOP

Related Classes of org.graphstream.graph.implementations.AbstractGraph

Copyright © 2018 www.massapicom. 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.