org.jgap.gp.impl
Class DefaultPopulationCreator
- java.lang.Object
-
- org.jgap.gp.impl.DefaultPopulationCreator
-
- All Implemented Interfaces:
- IPopulationCreator
public class DefaultPopulationCreator extends java.lang.Object implements IPopulationCreator
Default implementation of interface IPopulationCreator. Creates a complete population with JGAP standard means.- Since:
- 3.2.2
-
-
Constructor Summary
Constructors Constructor and Description DefaultPopulationCreator()DefaultPopulationCreator(IProgramCreator a_programCreator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidinitialize(GPPopulation a_pop, java.lang.Class[] a_types, java.lang.Class[][] a_argTypes, CommandGene[][] a_nodeSets, int[] a_minDepths, int[] a_maxDepths, int a_maxNodes, boolean[] a_fullModeAllowed)Initializes the given population by creating individuals for it.
-
-
-
Constructor Detail
-
DefaultPopulationCreator
public DefaultPopulationCreator()
-
DefaultPopulationCreator
public DefaultPopulationCreator(IProgramCreator a_programCreator)
-
-
Method Detail
-
initialize
public void initialize(GPPopulation a_pop, java.lang.Class[] a_types, java.lang.Class[][] a_argTypes, CommandGene[][] a_nodeSets, int[] a_minDepths, int[] a_maxDepths, int a_maxNodes, boolean[] a_fullModeAllowed) throws InvalidConfigurationException
Initializes the given population by creating individuals for it.- Specified by:
initializein interfaceIPopulationCreator- Parameters:
a_pop- the population to initializea_types- the type for each chromosome, the length of the array represents the number of chromosomesa_argTypes- the types of the arguments to each chromosome, must be an array of arrays, the first dimension of which is the number of chromosomes and the second dimension of which is the number of arguments to the chromosomea_nodeSets- the nodes which are allowed to be used by each chromosome, must be an array of arrays, the first dimension of which is the number of chromosomes and the second dimension of which is the number of nodesa_minDepths- contains the minimum depth allowed for each chromosomea_maxDepths- contains the maximum depth allowed for each chromosomea_maxNodes- reserve space for a_maxNodes number of nodesa_fullModeAllowed- array of boolean values. For each chromosome there is one value indicating whether the full mode for creating chromosome generations during evolution is allowed (true) or not (false)- Throws:
InvalidConfigurationException- in case of any error- Since:
- 3.2.2
-
-
DMelt 3.0 © DataMelt by jWork.ORG