Package uk.ac.man.cs.mig.util.graph.graph.impl

Examples of uk.ac.man.cs.mig.util.graph.graph.impl.DefaultGraph


    n2 = new DefaultNode(r2);

    n3 = new DefaultNode(r3);

    Graph graph = new DefaultGraph();

    graph.add(n1);

    graph.add(n2);

    graph.add(n3);

    assertTrue(graph.getNodeCount() == 2);

    Edge e1, e2;

    e1 = new DefaultEdge(n1, n2, "Edge1", 2);

    e2 = new DefaultEdge(n2, n3, "Edge2", 2);

    graph.add(e1);

    graph.add(e2);

    assertTrue(graph.getEdgeCount() == 2);

    graph.add(e1);

    assertTrue(graph.getEdgeCount() == 2);


  }
View Full Code Here


   * Creates a <code>Graph</code>
   * @return The newly created <code>Graph</code>
   */
  public Graph createGraph()
  {
    return new DefaultGraph();
  }
View Full Code Here

TOP

Related Classes of uk.ac.man.cs.mig.util.graph.graph.impl.DefaultGraph

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.