Interface ChromosomeFactory<T extends Chromosome>

Type Parameters:
T - Type of the fitness measurement
All Known Implementing Classes:
BitChromosomeFactory, DoubleChromosomeFactory, FloatChromosomeFactory, IntChromosomeFactory, NeatConnectedChromosomeFactory, NeatEmptyChromosomeFactory, ProgramTreeChromosomeFactory

public interface ChromosomeFactory<T extends Chromosome>
Interface for any class wishing to generate chromosomes
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canHandle(ChromosomeSpec chromosomeSpec)
    Validates if this factory is appropriate for generating a chromosome based on the specifications passed as a parameter
    generate(ChromosomeSpec chromosomeSpec)
    Generate a chromosome based on the specifications passed as a parameter
  • Method Details

    • canHandle

      boolean canHandle(ChromosomeSpec chromosomeSpec)
      Validates if this factory is appropriate for generating a chromosome based on the specifications passed as a parameter
      Parameters:
      chromosomeSpec - Specifications of the chromosome we wish to generate
      Returns:
      true if the implementation can generate a chromosome based on the specifications
    • generate

      T generate(ChromosomeSpec chromosomeSpec)
      Generate a chromosome based on the specifications passed as a parameter
      Parameters:
      chromosomeSpec - Specifications of the chromosome we wish to generate
      Returns:
      Generated chromosome