Class MultiParentVariation
java.lang.Object
org.moeaframework.core.operator.real.MultiParentVariation
- All Implemented Interfaces:
Configurable
,Variation
- Direct Known Subclasses:
AdaptiveMetropolis
,PCX
,SPX
,UNDX
Abstract class for operators that can take a variable number of parents and produce a variable number of offspring.
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
The number of offspring produced by this operator.protected int
The number of parents required by this operator. -
Constructor Summary
ConstructorDescriptionMultiParentVariation
(int numberOfParents, int numberOfOffspring) Creates a new multi-parent variation operator. -
Method Summary
Modifier and TypeMethodDescriptionint
getArity()
Returns the number of solutions that must be supplied to theevolve
method.int
Returns the number of offspring produced by this operator.int
Returns the number of parents required by this operator.void
setNumberOfOffspring
(int numberOfOffspring) Sets the number of offspring produced by this operator.void
setNumberOfParents
(int numberOfParents) Sets the number of parents required by this operator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.core.configuration.Configurable
applyConfiguration, getConfiguration
-
Field Details
-
numberOfParents
protected int numberOfParentsThe number of parents required by this operator. -
numberOfOffspring
protected int numberOfOffspringThe number of offspring produced by this operator.
-
-
Constructor Details
-
MultiParentVariation
public MultiParentVariation(int numberOfParents, int numberOfOffspring) Creates a new multi-parent variation operator.- Parameters:
numberOfParents
- the number of parents required by this operatornumberOfOffspring
- the number of offspring produced by this operator
-
-
Method Details
-
getNumberOfParents
public int getNumberOfParents()Returns the number of parents required by this operator.- Returns:
- the number of parents required by this operator
-
setNumberOfParents
public void setNumberOfParents(int numberOfParents) Sets the number of parents required by this operator.- Parameters:
numberOfParents
- the number of parents required by this operator
-
getNumberOfOffspring
public int getNumberOfOffspring()Returns the number of offspring produced by this operator.- Returns:
- the number of offspring produced by this operator
-
setNumberOfOffspring
public void setNumberOfOffspring(int numberOfOffspring) Sets the number of offspring produced by this operator.- Parameters:
numberOfOffspring
- the number of offspring produced by this operator
-
getArity
public int getArity()Description copied from interface:Variation
Returns the number of solutions that must be supplied to theevolve
method.
-