@Test public void testGrid() throws Exception { int length = 8, width = 7; Structure result = (new Grid()).generate(new GridParameters(Arrays.asList(Integer.toString(length), Integer.toString(width)))); assertTrue(result instanceof UndirectedGraph); assertEquals(length*width,result.getVertices().size()); assertEquals((length-1)*width + (width-1)*length,result.getEdges().size()); }
public abstract Structure generate(AlgorithmParameters p) throws Exception;
Generator { public abstract Structure generate(AlgorithmParameters p) throws Exception; }
Generator { public abstract Structure generate(AlgorithmParameters p) throws Exception;  }
Generator { public abstract Structure generate(AlgorithmParameters p) throws Exception;  AlgorithmParameters getParameters(); abstract Structure generate(AlgorithmParameters p); GeneratorDescription getDescription(); }
Generator { public abstract Structure generate(AlgorithmParameters p) throws Exception;  AlgorithmParameters getParameters(); abstract Structure generate(AlgorithmParameters p); GeneratorDescription getDescription();  }