Class DoubleChromosomeFactory

java.lang.Object
net.bmahe.genetics4j.core.chromosomes.factory.DoubleChromosomeFactory
All Implemented Interfaces:
ChromosomeFactory<DoubleChromosome>

public class DoubleChromosomeFactory extends Object implements ChromosomeFactory<DoubleChromosome>
  • Field Details

  • Constructor Details

    • DoubleChromosomeFactory

      public DoubleChromosomeFactory(RandomGenerator _randomGenerator)
  • Method Details

    • canHandle

      public boolean canHandle(ChromosomeSpec chromosomeSpec)
      Description copied from interface: ChromosomeFactory
      Validates if this factory is appropriate for generating a chromosome based on the specifications passed as a parameter
      Specified by:
      canHandle in interface ChromosomeFactory<DoubleChromosome>
      Parameters:
      chromosomeSpec - Specifications of the chromosome we wish to generate
      Returns:
      true if the implementation can generate a chromosome based on the specifications
    • generate

      public DoubleChromosome generate(ChromosomeSpec chromosomeSpec)
      Description copied from interface: ChromosomeFactory
      Generate a chromosome based on the specifications passed as a parameter
      Specified by:
      generate in interface ChromosomeFactory<DoubleChromosome>
      Parameters:
      chromosomeSpec - Specifications of the chromosome we wish to generate
      Returns:
      Generated chromosome