Class FloatChromosomeFactory

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

public class FloatChromosomeFactory extends Object implements ChromosomeFactory<FloatChromosome>
  • Field Details

  • Constructor Details

    • FloatChromosomeFactory

      public FloatChromosomeFactory(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<FloatChromosome>
      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 FloatChromosome 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<FloatChromosome>
      Parameters:
      chromosomeSpec - Specifications of the chromosome we wish to generate
      Returns:
      Generated chromosome