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 TypeMethodDescriptionboolean
canHandle
(ChromosomeSpec chromosomeSpec) Validates if this factory is appropriate for generating a chromosome based on the specifications passed as a parametergenerate
(ChromosomeSpec chromosomeSpec) Generate a chromosome based on the specifications passed as a parameter
-
Method Details
-
canHandle
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
Generate a chromosome based on the specifications passed as a parameter- Parameters:
chromosomeSpec
- Specifications of the chromosome we wish to generate- Returns:
- Generated chromosome
-