ch.bfh.algo.example
Class GraphStress

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

public class GraphStress
extends Object

The class GraphStress contains Stess Tests for the Graph

Version:
1.0
Author:
Emmanuel Benoist

Constructor Summary
GraphStress()
           
 
Method Summary
 Graph<Integer,String> constructDirectedGraph(int numberOfVertices, int numberOfEdges)
          The constructDirectedGraph method is used to initialize a default directed Graph.
static Sequence<ch.bfh.algo.example.GraphStress.DecoratedVertex> dfsTraversal(Graph<Integer,String> g, List<Position<String>> vertices)
          The dfsTraversal is an example of the possible implementation of a Depth First Search traversal of a Graph.
static void main(String[] args)
           
static void reverseAllEdges(Graph<Integer,String> g)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphStress

public GraphStress()
Method Detail

dfsTraversal

public static Sequence<ch.bfh.algo.example.GraphStress.DecoratedVertex> dfsTraversal(Graph<Integer,String> g,
                                                                                     List<Position<String>> vertices)
The dfsTraversal is an example of the possible implementation of a Depth First Search traversal of a Graph. In this case, we use the DecoratedVertex to store inside each vertex if it has been visited.

Returns:
a Sequence value

reverseAllEdges

public static void reverseAllEdges(Graph<Integer,String> g)

constructDirectedGraph

public Graph<Integer,String> constructDirectedGraph(int numberOfVertices,
                                                    int numberOfEdges)
The constructDirectedGraph method is used to initialize a default directed Graph. The returned graph contains numberOfVertices vertices and numberOfEdges directed edges.

Returns:
a Graph value

run

public void run()

main

public static void main(String[] args)