|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.algorithm.Algorithm net.sourceforge.cilib.algorithm.population.PopulationBasedAlgorithm net.sourceforge.cilib.algorithm.population.MultiPopulationBasedAlgorithm
public abstract class MultiPopulationBasedAlgorithm
Algorithm class to describe the notion of aggregated PopulationBasedAlgorithm instances.
The objective of this class is to ensure that the manner in which various multi-population based algorithms are interfaced in the same manner.
Examples of such algorithms can include:
Field Summary | |
---|---|
protected AlgorithmIterator<PopulationBasedAlgorithm> |
algorithmIterator
|
protected List<PopulationBasedAlgorithm> |
subPopulationsAlgorithms
|
Fields inherited from class net.sourceforge.cilib.algorithm.Algorithm |
---|
optimisationProblem |
Constructor Summary | |
---|---|
MultiPopulationBasedAlgorithm()
Create an instance of MultiPopulationBasedAlgorithm. |
|
MultiPopulationBasedAlgorithm(MultiPopulationBasedAlgorithm copy)
Create a copy of the provided instance. |
Method Summary | |
---|---|
Object |
accept(TopologyVisitor visitor)
General method to accept a visitor to perform a calculation on the current algorithm. |
void |
addPopulationBasedAlgorithm(PopulationBasedAlgorithm algorithm)
Add a PopulationBasedAlgorithm to the list of maintained sub-populations. |
protected abstract void |
algorithmIteration()
The actual operations that the current Algorithm performs within a single iteration. |
AlgorithmIterator<PopulationBasedAlgorithm> |
getAlgorithmIterator()
Get an AlgorithmIterator to iterate over the current collection of PopulationBasedAlgorithms. |
PopulationInitialisationStrategy |
getInitialisationStrategy()
Get the current PopulationInitialisationStrategy . |
List<PopulationBasedAlgorithm> |
getPopulations()
Get the List of current sub-populations. |
Topology<? extends Entity> |
getTopology()
Get the current collection (population) of entities. |
Iterator<PopulationBasedAlgorithm> |
iterator()
|
void |
removePopulationBasedalgorithm(PopulationBasedAlgorithm algorithm)
Remove the provided PopulationBasedAlgorithm from the collection of maintained instances. |
void |
reset()
Reset the Algorithm internals if needed. |
void |
setAlgorithmIterator(AlgorithmIterator<PopulationBasedAlgorithm> algorithmIterator)
Set the type of iterator to be used. |
void |
setInitialisationStrategy(PopulationInitialisationStrategy initialisationStrategy)
Set the initialisation strategy to use for the initialisation of the population. |
void |
setPopulations(List<PopulationBasedAlgorithm> populationBasedAlgorithms)
Set the list of PopulationBasedAlgorithm instances that the MultiPopulationBasedAlgorithm should maintain. |
Methods inherited from class net.sourceforge.cilib.algorithm.population.PopulationBasedAlgorithm |
---|
getBestSolution, getClone, getSolutions |
Methods inherited from class net.sourceforge.cilib.algorithm.Algorithm |
---|
addAlgorithmListener, addStoppingCondition, get, getAlgorithmList, getIterations, getOptimisationProblem, getPercentageComplete, getStoppingConditions, initialise, isFinished, performInitialisation, performIteration, performUninitialisation, removeAlgorithmListener, removeStoppingCondition, run, setOptimisationProblem, terminate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List<PopulationBasedAlgorithm> subPopulationsAlgorithms
protected AlgorithmIterator<PopulationBasedAlgorithm> algorithmIterator
Constructor Detail |
---|
public MultiPopulationBasedAlgorithm()
public MultiPopulationBasedAlgorithm(MultiPopulationBasedAlgorithm copy)
copy
- The instance to copy.Method Detail |
---|
public void reset()
reset
in class Algorithm
public Iterator<PopulationBasedAlgorithm> iterator()
iterator
in interface Iterable<PopulationBasedAlgorithm>
protected abstract void algorithmIteration()
algorithmIteration
in class PopulationBasedAlgorithm
public List<PopulationBasedAlgorithm> getPopulations()
public void setPopulations(List<PopulationBasedAlgorithm> populationBasedAlgorithms)
populationBasedAlgorithms
- The List of PopulationBasedAlgorithms to set.public void addPopulationBasedAlgorithm(PopulationBasedAlgorithm algorithm)
algorithm
- The PopulationBasedAlgorithm to add to the current collection.public void removePopulationBasedalgorithm(PopulationBasedAlgorithm algorithm)
algorithm
- The instance to remove from the collection.public AlgorithmIterator<PopulationBasedAlgorithm> getAlgorithmIterator()
public void setAlgorithmIterator(AlgorithmIterator<PopulationBasedAlgorithm> algorithmIterator)
algorithmIterator
- The iterator instance to set.public Object accept(TopologyVisitor visitor)
accept
in class PopulationBasedAlgorithm
visitor
- The Visitor to be applied to the algorithm
public Topology<? extends Entity> getTopology()
PopulationBasedAlgorithm
getTopology
in class PopulationBasedAlgorithm
public PopulationInitialisationStrategy getInitialisationStrategy()
PopulationBasedAlgorithm
PopulationInitialisationStrategy
.
getInitialisationStrategy
in class PopulationBasedAlgorithm
PopulationInitialisationStrategy
.public void setInitialisationStrategy(PopulationInitialisationStrategy initialisationStrategy)
PopulationBasedAlgorithm
setInitialisationStrategy
in class PopulationBasedAlgorithm
initialisationStrategy
- The population initialisation strategy to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |