@Test public void testNumComponents() { final TSPProblem instance = new TSPProblem(); instance.setup(state, BASE); assertEquals((int) Math.pow(532, 2), instance.numComponents()); assertTrue(instance.repOK()); }
@Override public int numComponents() { return graph.numEdges(); }
TSPProblem extends Problem implements SimpleProblemForm, ConstructiveProblemForm<TSPComponent> { @Override public int numComponents() { return graph.numEdges(); } }
TSPProblem extends Problem implements SimpleProblemForm, ConstructiveProblemForm<TSPComponent> { @Override public int numComponents() { return graph.numEdges(); }  }
TSPProblem extends Problem implements SimpleProblemForm, ConstructiveProblemForm<TSPComponent> { @Override public int numComponents() { return graph.numEdges(); }  TSPComponent getComponent(final int from, final int to); TSPComponent getComponentFromString(final String s); int numNodes(); @Override void setup(EvolutionState state, Parameter base); boolean isViolated(final ConstructiveIndividual<TSPComponent> partialSolution, final Component component); @Override TSPComponent getArbitraryComponent(final EvolutionState state, final int thread); @Override List<TSPComponent> getAllComponents(); @Override List<TSPComponent> getAllowedComponents(final ConstructiveIndividual<TSPComponent> partialSolution); @Override boolean isCompleteSolution(final ConstructiveIndividual<TSPComponent> solution); @Override void evaluate(final EvolutionState state, final Individual ind, final int subpopulation, final int threadnum); @Override int numComponents(); final boolean repOK(); }
TSPProblem extends Problem implements SimpleProblemForm, ConstructiveProblemForm<TSPComponent> { @Override public int numComponents() { return graph.numEdges(); }  TSPComponent getComponent(final int from, final int to); TSPComponent getComponentFromString(final String s); int numNodes(); @Override void setup(EvolutionState state, Parameter base); boolean isViolated(final ConstructiveIndividual<TSPComponent> partialSolution, final Component component); @Override TSPComponent getArbitraryComponent(final EvolutionState state, final int thread); @Override List<TSPComponent> getAllComponents(); @Override List<TSPComponent> getAllowedComponents(final ConstructiveIndividual<TSPComponent> partialSolution); @Override boolean isCompleteSolution(final ConstructiveIndividual<TSPComponent> solution); @Override void evaluate(final EvolutionState state, final Individual ind, final int subpopulation, final int threadnum); @Override int numComponents(); final boolean repOK(); final static String P_FILE; final static String P_ALLOW_CYCLES; }