1 10 package org.jgap.impl; 11 12 import org.jgap.*; 13 14 20 public class DefaultCrossoverRateCalculator 21 extends BaseRateCalculator { 22 23 private static final String CVS_REVISION = "$Revision: 1.8 $"; 24 25 30 public DefaultCrossoverRateCalculator(Configuration a_config) 31 throws InvalidConfigurationException { 32 super(a_config); 33 } 34 35 45 public int calculateCurrentRate() { 46 int size = getConfiguration().getChromosomeSize(); 47 if (size < 1) { 48 size = 1; 49 } 50 return size; 51 } 52 53 64 public boolean toBePermutated(IChromosome a_chrom, int a_geneIndex) { 65 return true; 66 } 67 } 68 | Popular Tags |