org.encog.ml.ea.opp
Class OperationList
- java.lang.Object
-
- org.encog.util.obj.ChooseObject<EvolutionaryOperator>
-
- org.encog.ml.ea.opp.OperationList
-
- All Implemented Interfaces:
- java.io.Serializable
public class OperationList extends ChooseObject<EvolutionaryOperator>
This class holds a list of evolutionary operators. Each operator is given a probability weight. Based on the number of parents available a random selection of an operator can be made based on the probability given each of the operators.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description OperationList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intmaxOffspring()Determine the maximum number of offspring that might be produced by any of the operators in this list.intmaxParents()Determine the maximum number of parents required by any of the operators in the list.EvolutionaryOperatorpickMaxParents(java.util.Random rnd, int maxParents)Pick a operator based on the number of parents available.-
Methods inherited from class org.encog.util.obj.ChooseObject
add, clear, finalizeStructure, getList, pick, pickFirst, size
-
-
-
-
Method Detail
-
maxOffspring
public int maxOffspring()
Determine the maximum number of offspring that might be produced by any of the operators in this list.- Returns:
- The maximum number of offspring.
-
maxParents
public int maxParents()
Determine the maximum number of parents required by any of the operators in the list.- Returns:
- The maximum number of parents.
-
pickMaxParents
public EvolutionaryOperator pickMaxParents(java.util.Random rnd, int maxParents)
Pick a operator based on the number of parents available.- Parameters:
rnd- A random number generator.maxParents- The maximum number of parents available.- Returns:
- The operator that was selected.
-
-
DMelt 3.0 © DataMelt by jWork.ORG