es.udc.gii.common.eaf.algorithm.operator.replace
Class ElitismOperator
java.lang.Object
java.util.Observable
es.udc.gii.common.eaf.algorithm.operator.replace.ReplaceOperator
es.udc.gii.common.eaf.algorithm.operator.replace.ElitismOperator
- All Implemented Interfaces:
- Operator, Configurable
public class ElitismOperator
- extends ReplaceOperator
This operator implements a replace operator with elitism. From the
i-population the operator choose the elitism best individuals
and change it from the elitism worst individuals of the
(i+1)-population. So the parameter elitism indicates the number
of individuals that survive to the next generation.
The code to config this operator is:
<Operator>
<Class>es.udc.gii.common.eaf.algorithm.operator.replace.ElitismOperator</Class>
<Elitism>value</Elitism>
</Operator>
Where Elitism is an integer that indicates the number of individuals that survive from one
generation to the next one. If this parameter does not appear in the configuration, it is set
to its default value.
Default values:
- Since:
- 1.0
- Author:
- Grupo Integrado de IngenierĂa (www.gii.udc.es)
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
elitism
private int elitism
ElitismOperator
public ElitismOperator()
- Creates a new instance of ElitismOperator
ElitismOperator
public ElitismOperator(int elitism)
configure
public void configure(org.apache.commons.configuration.Configuration conf)
- Description copied from interface:
Configurable
- Configures the specific element that implements this method.
- Specified by:
configure
in interface Configurable
- Overrides:
configure
in class ReplaceOperator
- Parameters:
conf
- a Configuration object.- See Also:
Configuration
replace
protected java.util.List<Individual> replace(EvolutionaryAlgorithm algorithm,
java.util.List<Individual> toPopulation)
- Specified by:
replace
in class ReplaceOperator