Class NeatConnectedChromosomeFactory
java.lang.Object
net.bmahe.genetics4j.neat.chromosomes.factory.NeatConnectedChromosomeFactory
- All Implemented Interfaces:
ChromosomeFactory<NeatChromosome>
public class NeatConnectedChromosomeFactory
extends Object
implements ChromosomeFactory<NeatChromosome>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNeatConnectedChromosomeFactory
(RandomGenerator _randomGenerator, InnovationManager _innovationManager) -
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
-
Field Details
-
randomGenerator
-
innovationManager
-
-
Constructor Details
-
NeatConnectedChromosomeFactory
public NeatConnectedChromosomeFactory(RandomGenerator _randomGenerator, InnovationManager _innovationManager)
-
-
Method Details
-
canHandle
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 interfaceChromosomeFactory<NeatChromosome>
- Parameters:
chromosomeSpec
- Specifications of the chromosome we wish to generate- Returns:
- true if the implementation can generate a chromosome based on the specifications
-
generate
Description copied from interface:ChromosomeFactory
Generate a chromosome based on the specifications passed as a parameter- Specified by:
generate
in interfaceChromosomeFactory<NeatChromosome>
- Parameters:
chromosomeSpec
- Specifications of the chromosome we wish to generate- Returns:
- Generated chromosome
-