|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.algorithm.population.AbstractIterationStrategy<E>
E
- The PopulationBasedAlgorithm type.public abstract class AbstractIterationStrategy<E extends PopulationBasedAlgorithm>
Generic IterationStrategy
class for all population based algorithms. Each and every IterationStrategy
will have a pipeline available to it in order to specify the needed operators that will be
required to be executed during the iteration. For the implementing classes, a default
pipeline is constructed and made available, this can (as with everything within CIlib) be overridden.
Field Summary | |
---|---|
protected BoundaryConstraint |
boundaryConstraint
|
protected CompositeOperator |
operatorPipeline
|
Constructor Summary | |
---|---|
AbstractIterationStrategy()
Create an instance of the IterationStrategy. |
Method Summary | |
---|---|
BoundaryConstraint |
getBoundaryConstraint()
Get the currently associated BoundaryConstraint. |
abstract AbstractIterationStrategy<E> |
getClone()
Create a cloned copy of the current object and return it. |
CompositeOperator |
getOperatorPipeline()
Get the List<Operator> that represents the sequence
of operators to be performed within the current IterationStrategy. |
abstract void |
performIteration(E algorithm)
Perform the iteration of the PopulationBasedAlgorithm. |
void |
setBoundaryConstraint(BoundaryConstraint boundaryConstraint)
Set the BoundaryConstraint to maintain within this IterationStrategy. |
void |
setOperatorPipeline(CompositeOperator operatorPipeline)
Set the pipeline to be used within the current IterationStrategy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BoundaryConstraint boundaryConstraint
protected CompositeOperator operatorPipeline
Constructor Detail |
---|
public AbstractIterationStrategy()
Method Detail |
---|
public abstract AbstractIterationStrategy<E> getClone()
getClone
in interface IterationStrategy<E extends PopulationBasedAlgorithm>
getClone
in interface Cloneable
Object.clone()
public abstract void performIteration(E algorithm)
Due to the nature of the PopulationBasedAlgorithms, the actual manner in which the algorithm's iteration is performed is deferred to the specific iteration strategy being used.
This implies that the general structure of the iteration for a specific flavour of algorithm is constant with modifications on that algorithm being made. For example, within a Genetic Algorithm you would expect:
performIteration
in interface IterationStrategy<E extends PopulationBasedAlgorithm>
algorithm
- The algorithm to perform the iteration process on.public BoundaryConstraint getBoundaryConstraint()
public void setBoundaryConstraint(BoundaryConstraint boundaryConstraint)
boundaryConstraint
- The BoundaryConstraint to set.public CompositeOperator getOperatorPipeline()
List<Operator>
that represents the sequence
of operators to be performed within the current IterationStrategy.
List<Operator>
public void setOperatorPipeline(CompositeOperator operatorPipeline)
operatorPipeline
- The pipeline to be used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |