|
||||||||||
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.OperatorChain<T>
public class OperatorChain<T extends Operator>
Implements an operators' chain. This chain contains a group of operators to be executed on a particular problem to resolve it. This chain could be executed operator by operator or all operators in one step.
Field Summary | |
---|---|
private int |
next
Indicates the next operator to be executed. |
private java.util.List<T> |
operators
The operators of this chain. |
Constructor Summary | |
---|---|
OperatorChain()
Creates a new operator chain with an empty list of operators. |
Method Summary | |
---|---|
void |
addOperators(T operator)
Add an object of type Operator to the List operators. |
java.util.List<Individual> |
execute(EvolutionaryAlgorithm algorithm,
Population population)
This method execute all chain's operators in one step over the current algorithm. |
java.util.List<Individual> |
executeNext(EvolutionaryAlgorithm algorithm,
java.util.List<Individual> individuals)
Execute the next operator in the chain and change the value of next attribute to execute the next operator the next time. |
java.util.List<T> |
getOperators()
Get the list of operators |
void |
removeOperators(T operator)
Remove an object of type Operator from the List operators. |
java.lang.String |
toString()
Return the String that represents an operators' chain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int next
private java.util.List<T extends Operator> operators
Constructor Detail |
---|
public OperatorChain()
Method Detail |
---|
public void addOperators(T operator)
operator
- an operator to be inserted in the chain.public void removeOperators(T operator)
operator
- an operator to be deleted from the chain.public java.util.List<T> getOperators()
public java.util.List<Individual> execute(EvolutionaryAlgorithm algorithm, Population population)
algorithm
- the algorithm wich over we will execute the chain's operator.population
- the initial population over we will execute the operators. And when we return
to the execution of the algorithm this population will change.public java.util.List<Individual> executeNext(EvolutionaryAlgorithm algorithm, java.util.List<Individual> individuals)
algorithm
- the algorithm wich over we will execute the current operator.population
- the population which over we will execute the current operator.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |