org.jgap.gp.impl
Class StaticPopulationCreator
- java.lang.Object
-
- org.jgap.gp.impl.StaticPopulationCreator
-
- All Implemented Interfaces:
- IPopulationCreator
public class StaticPopulationCreator extends java.lang.Object implements IPopulationCreator
Creates a population by copying a given population into it.- Since:
- 3.3.3
-
-
Constructor Summary
Constructors Constructor and Description StaticPopulationCreator()Default constructor, mainly used for dynamic instantiation.StaticPopulationCreator(GPPopulation a_pop)
-
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.
-
-
-
Constructor Detail
-
StaticPopulationCreator
public StaticPopulationCreator()
Default constructor, mainly used for dynamic instantiation.- Since:
- 3.3.3
-
StaticPopulationCreator
public StaticPopulationCreator(GPPopulation a_pop)
- Parameters:
a_pop- population containing the elements to be preset- Since:
- 3.3.3
-
-
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.- 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.3.3
-
-
DMelt 3.0 © DataMelt by jWork.ORG