ch.bfh.algo.example
Class GraphExample1

java.lang.Object
  extended by ch.bfh.algo.example.GraphExample1

public class GraphExample1
extends Object

The class GraphExample1 contains one very simple example of the ch.bfh.algo.Graph interface. This example contains the creation of one simple graph containing 6 vertices and 8 edges, which are all Positions in our framework.

Version:
1.0
Author:
Emmanuel Benoist

Constructor Summary
GraphExample1()
           
 
Method Summary
static Sequence<Position<String>> bfsTraversal(Graph<Integer,String> g)
          The bfsTraversal is an example (very primitive) of the possible implementation of a Breadth First Search traversal of a Graph
static Graph<Integer,String> constructUndirectedGraph()
          The constructUndirectedGraph method is used to initialize a default undirected Graph.
static void ex1()
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphExample1

public GraphExample1()
Method Detail

bfsTraversal

public static Sequence<Position<String>> bfsTraversal(Graph<Integer,String> g)
The bfsTraversal is an example (very primitive) of the possible implementation of a Breadth First Search traversal of a Graph

Returns:
a Sequence value

constructUndirectedGraph

public static Graph<Integer,String> constructUndirectedGraph()
The constructUndirectedGraph method is used to initialize a default undirected Graph. The returned graph contains 6 vertices and 8 edges.

Returns:
a Graph value

ex1

public static void ex1()

main

public static void main(String[] args)