Package org.graphstream.graph.implementations

Examples of org.graphstream.graph.implementations.MultiGraph.addNode()


  @Test
  public void testElementUtilityMethods() {
    Graph graph = new MultiGraph("g1");

    Node A = graph.addNode("A");

    assertEquals("A", A.getId());
    assertEquals(0, A.getAttributeCount());

    // First attribute of.
View Full Code Here


  @Test
  public void testElementIterables() {
    Graph graph = new MultiGraph("g1");

    Node A = graph.addNode("A");

    assertEquals("A", A.getId());
    assertEquals(0, A.getAttributeCount());

    // First attribute of.
View Full Code Here

    String style = "node{fill-mode:plain;fill-color:#567;size:6px;}";
    g.addAttribute("stylesheet", style);
    g.addAttribute("ui.antialias", true);
    g.addAttribute("layout.stabilization-limit", 0);
    for (int i = 0; i < 500; i++) {
      g.addNode(i + "");
      if (i > 0) {
        g.addEdge(i + "-" + (i - 1), i + "", (i - 1) + "");
        g.addEdge(i + "--" + (i / 2), i + "", (i / 2) + "");
      }
    }
View Full Code Here

        g.addSink(nsc);

        g.addAttribute("id", id);

        for (int i = 0; i < 30; i++) {
          g.addNode(prefix + i + "_1");
          g.addNode(prefix + i + "_0");
          g.addNode(prefix + i + "_2");
          try {
            Thread.sleep(1);
          } catch (InterruptedException e) {
View Full Code Here

        g.addAttribute("id", id);

        for (int i = 0; i < 30; i++) {
          g.addNode(prefix + i + "_1");
          g.addNode(prefix + i + "_0");
          g.addNode(prefix + i + "_2");
          try {
            Thread.sleep(1);
          } catch (InterruptedException e) {
            e.printStackTrace();
View Full Code Here

        g.addAttribute("id", id);

        for (int i = 0; i < 30; i++) {
          g.addNode(prefix + i + "_1");
          g.addNode(prefix + i + "_0");
          g.addNode(prefix + i + "_2");
          try {
            Thread.sleep(1);
          } catch (InterruptedException e) {
            e.printStackTrace();
          }
View Full Code Here

          error(e1.toString());
          return;
        }

        g.addSink(nsc);
        Node node0 = g.addNode("node0");
        Edge edge = g.addEdge("edge", "node0", "node1", true);
        node0.addAttribute("nodeAttribute", 0);
        node0.changeAttribute("nodeAttribute", 1);
        node0.removeAttribute("nodeAttribute");
        edge.addAttribute("edgeAttribute", 0);
View Full Code Here

        String style = "node{fill-mode:plain;fill-color:#567;size:6px;}";
        g.addAttribute("stylesheet", style);
        g.addAttribute("ui.antialias", true);
        g.addAttribute("layout.stabilization-limit", 0);
        for (int i = 0; i < 5000; i++) {
          g.addNode(i + "");
          if (i > 0) {
            g.addEdge(i + "-" + (i - 1), i + "", (i - 1) + "");
            g.addEdge(i + "--" + (i / 2), i + "", (i / 2) + "");
          }
        }
View Full Code Here

    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);
View Full Code Here

    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);
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.