Author: simonetripodi
Date: Thu Jun 30 12:07:41 2011
New Revision: 1141497
URL: http://svn.apache.org/viewvc?rev=1141497&view=rev
Log:
code polishing
Modified:
commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java
Modified:
commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java?rev=1141497&r1=1141496&r2=1141497&view=diff
==============================================================================
---
commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java
(original)
+++
commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/coloring/GraphColoringTestCase.java
Thu Jun 30 12:07:41 2011
@@ -63,7 +63,6 @@ public class GraphColoringTestCase
assertEquals( 3, coloredVertices.getRequiredColors() );
checkColoring( g, coloredVertices );
-
}
@Test
@@ -77,7 +76,6 @@ public class GraphColoringTestCase
assertEquals( 100, coloredVertices.getRequiredColors() );
checkColoring( g1, coloredVertices );
-
}
@Test
@@ -91,7 +89,6 @@ public class GraphColoringTestCase
assertEquals( 2, coloredVertices.getRequiredColors() );
checkColoring( g1, coloredVertices );
-
}
@Test
@@ -108,7 +105,6 @@ public class GraphColoringTestCase
assertEquals( 1, coloredVertices.getRequiredColors() );
checkColoring( g1, coloredVertices );
-
}
/**
@@ -145,14 +141,12 @@ public class GraphColoringTestCase
assertEquals( 2, coloring( g ).getRequiredColors() );
checkColoring( g, coloredVertices );
-
}
@Test
public void testSudoku()
throws Exception
{
-
UndirectedMutableGraph<Vertex, Edge> g1 =
GraphUtils.buildSudokuGraph();
// The true color number fot this graph is 9. but the greedy euristics
is not the best and returns 11.
@@ -160,21 +154,6 @@ public class GraphColoringTestCase
assertEquals( 11, sudoku.getRequiredColors() );
checkColoring( g1, sudoku );
-
- // for ( int i = 0; i < 9; i++ )
- // {
- // for ( int j = 0; j < 9; j++ )
- // {
- // System.out.print ( sudoku.getColor(GraphUtils.grid[i][j]) + " | " );
- // }
- // System.out.println();
- // }
-
- // Writer w = new OutputStreamWriter(System.out);
- // GraphUtils.DOTexport(w, g1);
- // w.flush();
- // w.close();
-
}
/**
@@ -190,7 +169,6 @@ public class GraphColoringTestCase
{
VertexPair<V> vp = g.getVertices( e );
assertTrue( coloredVertices.getColor( vp.getHead() ) !=
coloredVertices.getColor( vp.getTail() ) );
-
}
}