Package org.graphstream.graph.implementations

Examples of org.graphstream.graph.implementations.MultiGraph


    new TestEdgeExtremities<MySingleNode>(g);
  }

  @Test
  public void checkMultiGraph() {
    Graph g = new MultiGraph("g");

    g.setNodeFactory(new MyMultiNodeFactory());
    g.setEdgeFactory(new MyMultiEdgeFactory());

    new TestAddRemoveNode<MyMultiNode>(g);
    new TestForEachNode<MyMultiNode>(g);
    new TestNodeCollection<MyMultiNode>(g);
    new TestAddRemoveEdge<MyMultiEdge>(g);
View Full Code Here


public class TestFileSourceDGS extends TestFileSourceBase {
  // Before

  @Before
  public void setUp() {
    graph = new MultiGraph("g1");
    input = new FileSourceDGS();
  }
View Full Code Here

public class TestFileSourceDOT extends TestFileSourceBase {
  // Before

  @Before
  public void setUp() {
    graph = new MultiGraph("g1");
    input = new FileSourceDOT();
  }
View Full Code Here

      e.printStackTrace();
    }
  }
 
  public void test() throws IOException {
    Graph graph = new MultiGraph("test GML");
    FileSinkGML out1 = new FileSinkGML();
    FileSinkDynamicGML out2 = new FileSinkDynamicGML();
 
    out1.begin("TestSinkGML.gml");
    out2.begin("TestSinkGML.dgml");
   
    graph.addSink(out1);
    graph.addSink(out2);
   
    graph.addNode("A");
    graph.getNode("A").addAttribute("s", "foo bar");
    graph.addNode("B");
    graph.stepBegins(1);
    graph.addEdge("AB", "A", "B", true);
    graph.getEdge("AB").addAttribute("n", 1);
    graph.stepBegins(2);
    graph.addAttribute("b", true);
    graph.getNode("B").addAttribute("c", 'X');
    graph.getNode("B").addAttribute("d", 'Y');
    graph.stepBegins(3);
    graph.getNode("B").removeAttribute("c");
    graph.removeAttribute("b");
    graph.removeNode("A");
    graph.removeNode("B");
   
    out1.end();
    out2.end();
  }
View Full Code Here

public class TestFileSourceGML extends TestFileSourceBase {
  // Before

  @Before
  public void setUp() {
    graph = new MultiGraph("g1");
    input = new FileSourceGML();
  }
View Full Code Here

public class TestFileSourceEdge extends TestFileSourceBase {
  // Before

  @Before
  public void setUp() {
    graph = new MultiGraph("g1");
    input = new FileSourceEdge();
    testEdgeIds = false;
  }
View Full Code Here

TOP

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

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.