Examples of AdjacencyListGraph


Examples of org.graphstream.graph.implementations.AdjacencyListGraph

  @Test
  public void testEOL() throws IOException {
    String base = "DGS004%neol 0 0%n%nan A%n";
    String[] eols = { /* LF */ "\n", /* CR+LF */ "\r\n" };
    FileSourceDGS source = new FileSourceDGS();
    Graph g = new AdjacencyListGraph("eol");

    source.addSink(g);

    for (String eol : eols) {
      String dgs = base.replace("%n", eol);
      StringReader in = new StringReader(dgs);

      try {
        source.readAll(in);
        assertNotNull(g.getNode("A"));
        g.clear();
      } catch (IOException e) {
        if (e.getCause() instanceof ParseException)
          fail();
        else
          throw e;
View Full Code Here

Examples of org.graphstream.graph.implementations.AdjacencyListGraph

  }

  @Test
  public void testAttributeRemoved() throws IOException {
    FileSourceDGS source = new FileSourceDGS();
    Graph g = new AdjacencyListGraph("eol");

    source.addSink(g);
    g.addSink(new TestAttributeRemoved("A", g));
    g.addSink(new VerboseSink());
   
    source.begin(getClass().getResourceAsStream("data/removeAttribute.dgs"));
   
    while (source.nextStep())
      ;
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.