ca.quine.jcommons.transform.graph.test
Class TransformGraphTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--ca.quine.jcommons.transform.graph.test.GraphTestCase
                    |
                    +--ca.quine.jcommons.transform.graph.test.TransformGraphTest
All Implemented Interfaces:
junit.framework.Test

public class TransformGraphTest
extends GraphTestCase


Constructor Summary
TransformGraphTest(String testName)
           
 
Method Summary
 void findMinimumSteinerTreeCompleteGraph(int size, String[] outputTypes)
          Find the Minimum Steiner Tree on a randomly weighted complete graph of size 5, with a given start node and 3 other vertices required.
 void testCreateListOfListsOfAllOrders2Elements()
           
 void testCreateListOfListsOfAllOrders3Elements()
           
 void testCreateListOfListsOfAllOrders4Elements()
           
 void testDijkstra()
           
 void testFindMinimumCostTree1()
          Find the optimal Minimum Steiner Tree on the given graph with edge D -> G of weight 3.
 void testFindMinimumCostTree2()
          Find the optimal Minimum Steiner Tree on the given graph with edge D -> G of weight 1.
 void testFindMinimumSteinerTreeCompleteGraph()
           
 void testFindMinimumSteinerTreeInputGraphIsTree()
           
 void testFindMinimumSteinerTreeSparseInputGraph()
           
 void testGeneticAlgorithmAgainstOptimal()
           
 void testMinimumCostTreeComplete1()
          Use the example in testFindMinimumCostTree1 and complete the graph with random weights; verify the tree and cost are correct.
 void testMinimumCostTreeComplete2()
          Use the example in testFindMinimumCostTree2 and complete the graph with random weights; verify the tree and cost are correct.
 void testOptimalSpecialCase1()
          Special case 1: a case found in random testing where the so-called optimal solution was not as good as the GA.
 void testRemoveElement()
           
 
Methods inherited from class ca.quine.jcommons.transform.graph.test.GraphTestCase
assertEquals, makeEdge, makeEdge
 
Methods inherited from class junit.framework.TestCase
countTestCases, createDefault, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransformGraphTest

public TransformGraphTest(String testName)
Method Detail

testRemoveElement

public void testRemoveElement()

testCreateListOfListsOfAllOrders2Elements

public void testCreateListOfListsOfAllOrders2Elements()

testCreateListOfListsOfAllOrders3Elements

public void testCreateListOfListsOfAllOrders3Elements()

testCreateListOfListsOfAllOrders4Elements

public void testCreateListOfListsOfAllOrders4Elements()

testFindMinimumCostTree1

public void testFindMinimumCostTree1()
                              throws Exception
Find the optimal Minimum Steiner Tree on the given graph with edge D -> G of weight 3.

Exception

testFindMinimumCostTree2

public void testFindMinimumCostTree2()
                              throws Exception
Find the optimal Minimum Steiner Tree on the given graph with edge D -> G of weight 1.

Exception

testMinimumCostTreeComplete1

public void testMinimumCostTreeComplete1()
                                  throws Exception
Use the example in testFindMinimumCostTree1 and complete the graph with random weights; verify the tree and cost are correct.

Exception

testMinimumCostTreeComplete2

public void testMinimumCostTreeComplete2()
                                  throws Exception
Use the example in testFindMinimumCostTree2 and complete the graph with random weights; verify the tree and cost are correct.

Exception

testFindMinimumSteinerTreeCompleteGraph

public void testFindMinimumSteinerTreeCompleteGraph()
                                             throws Exception
Exception

testFindMinimumSteinerTreeInputGraphIsTree

public void testFindMinimumSteinerTreeInputGraphIsTree()
                                                throws Exception
Exception

testFindMinimumSteinerTreeSparseInputGraph

public void testFindMinimumSteinerTreeSparseInputGraph()
                                                throws Exception
Exception

testGeneticAlgorithmAgainstOptimal

public void testGeneticAlgorithmAgainstOptimal()
                                        throws GraphException,
                                               IOException
GraphException
IOException

testOptimalSpecialCase1

public void testOptimalSpecialCase1()
                             throws GraphException
Special case 1: a case found in random testing where the so-called optimal solution was not as good as the GA.

GraphException

findMinimumSteinerTreeCompleteGraph

public void findMinimumSteinerTreeCompleteGraph(int size,
                                                String[] outputTypes)
                                         throws Exception
Find the Minimum Steiner Tree on a randomly weighted complete graph of size 5, with a given start node and 3 other vertices required.

Exception

testDijkstra

public void testDijkstra()