Ejemplo n.º 1
0
 public Chromosome(
     final Configuration a_configuration,
     Gene a_sampleGene,
     int a_desiredSize,
     IGeneConstraintChecker a_constraintChecker)
     throws InvalidConfigurationException {
   this(a_configuration, a_desiredSize);
   initFromGene(a_sampleGene);
   setConstraintChecker(a_constraintChecker);
 }
Ejemplo n.º 2
0
 /**
  * Constructs a Chromosome of the given size separate from any specific Configuration. This
  * constructor will use the given sample Gene to construct a new Chromosome instance containing
  * genes all of the same type as the sample Gene. This can be useful for constructing sample
  * chromosomes that use the same Gene type for all of their genes and that are to be used to setup
  * a Configuration object.
  *
  * @param a_configuration the configuration to use
  * @param a_sampleGene a concrete sampleGene instance that will be used as a template for all of
  *     the genes in this Chromosome
  * @param a_desiredSize the desired size (number of genes) of this Chromosome
  * @throws InvalidConfigurationException
  * @author Neil Rotstan
  * @author Klaus Meffert
  * @since 1.0
  */
 public Chromosome(
     final Configuration a_configuration, final Gene a_sampleGene, final int a_desiredSize)
     throws InvalidConfigurationException {
   this(a_configuration, a_desiredSize);
   initFromGene(a_sampleGene);
 }