|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.udc.gii.common.eaf.algorithm.operator.selection.SelectionOperator
es.udc.gii.common.eaf.algorithm.operator.selection.DeterministicTournamentSelection
public class DeterministicTournamentSelection
This class implements the deterministic tournament selection. The individuals of the population are arranged in groups and each individual in that group competes for reproduction. Only one individual wins in each group.
It is ensured that no individual competes with itself and it is ensured that all individuals get involved in at least one tournament (each individual is in at least one of the created groups). To configure this operator the xml code is:
<Operator><p>
<Class>es.udc.gii.common.eaf.algorithm.operator.selection.DeterministicTournamentSelection</Class>
<PoolSize>value</PoolSize>
</Operator>
Where the tag Class is mandatory and the tag PoolSize is the number of individuals
that are choosen to compete. If this tag does not appear in the configuration, the parameter poolSize
is set to its default value.Default values:
Field Summary | |
---|---|
private int |
poolSize
The pool size is the number of members that compete in each tournament. |
Constructor Summary | |
---|---|
DeterministicTournamentSelection()
Creates a new instance of DeterministicTournamentSelection |
|
DeterministicTournamentSelection(int poolSize)
Creates a new instance of DeterministicTournamentSelection |
Method Summary | |
---|---|
void |
configure(org.apache.commons.configuration.Configuration conf)
Configures the specific element that implements this method. |
java.util.List<Individual> |
operate(EvolutionaryAlgorithm algorithm,
java.util.List<Individual> individuals)
Execute this operator over a group of individuals. |
protected Individual |
select(EvolutionaryAlgorithm algorithm,
java.util.List<Individual> individuals)
|
Methods inherited from class es.udc.gii.common.eaf.algorithm.operator.selection.SelectionOperator |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int poolSize
Constructor Detail |
---|
public DeterministicTournamentSelection()
public DeterministicTournamentSelection(int poolSize)
Method Detail |
---|
public java.util.List<Individual> operate(EvolutionaryAlgorithm algorithm, java.util.List<Individual> individuals) throws OperatorException
Operator
This method will recive two parameters. The current algorithm, to visit it if it is necessary, for example, to get some parameter of the current execution. And a list of individuals on wich we will apply this operator.
operate
in interface Operator
operate
in class SelectionOperator
algorithm
- the current algorithm, to visit when it is necessary.individuals
- list of individuals on wich we will apply the operator.
OperatorException
- when occurs some type of error during the execution of this operator.public void configure(org.apache.commons.configuration.Configuration conf)
Configurable
configure
in interface Configurable
configure
in class SelectionOperator
conf
- a Configuration object.Configuration
protected Individual select(EvolutionaryAlgorithm algorithm, java.util.List<Individual> individuals)
select
in class SelectionOperator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |