|
||||||||||
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.SinglePopulationBasedAlgorithm net.sourceforge.cilib.ec.EC
public class EC
Generic EC skeleton algorithm. The algorithm is altered by defining the appropriate IterationStrategy.
Field Summary |
---|
Fields inherited from class net.sourceforge.cilib.algorithm.population.SinglePopulationBasedAlgorithm |
---|
initialisationStrategy |
Fields inherited from class net.sourceforge.cilib.algorithm.Algorithm |
---|
optimisationProblem |
Constructor Summary | |
---|---|
EC()
Create a new instance of EC . |
|
EC(EC copy)
Copy constructor. |
Method Summary | |
---|---|
void |
algorithmIteration()
Perform the iteration within the algorithm. |
OptimisationSolution |
getBestSolution()
Get the best current solution. |
EC |
getClone()
Create a cloned copy of the current object and return it. |
Entity |
getContribution()
Returns contribution to the solution for the co-operative optimisation algorithm. |
Fitness |
getContributionFitness()
Returns the fitness of contribution to the solution. |
IterationStrategy<EC> |
getIterationStrategy()
Get the IterationStrategy for the current EC . |
OptimisationProblem |
getOptimisationProblem()
Get the specified OptimisationProblem. |
List<OptimisationSolution> |
getSolutions()
Get the collection of best solutions. |
Topology<? extends Entity> |
getTopology()
Get the current collection (population) of entities. |
void |
performInitialisation()
Perform the needed initialisation required before the execution of the algorithm starts. |
void |
setIterationStrategy(IterationStrategy iterationStrategy)
Set the current IterationStrategy. |
void |
setOptimisationProblem(OptimisationProblem problem)
Set the optimisation problem to be solved. |
void |
setTopology(Topology topology)
Set the Topology for the population-based algorithm. |
void |
updateContributionFitness(Fitness fitness)
Updates the new fitness for the solution contribution. |
Methods inherited from class net.sourceforge.cilib.algorithm.population.SinglePopulationBasedAlgorithm |
---|
accept, getInitialisationStrategy, setInitialisationStrategy |
Methods inherited from class net.sourceforge.cilib.algorithm.Algorithm |
---|
addAlgorithmListener, addStoppingCondition, get, getAlgorithmList, getIterations, getPercentageComplete, getStoppingConditions, initialise, isFinished, performIteration, performUninitialisation, removeAlgorithmListener, removeStoppingCondition, reset, run, terminate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EC()
EC
.
public EC(EC copy)
copy
- The instance to copy.Method Detail |
---|
public EC getClone()
getClone
in interface Cloneable
getClone
in class SinglePopulationBasedAlgorithm
Object.clone()
public void performInitialisation()
performInitialisation
in class Algorithm
public void algorithmIteration()
algorithmIteration
in class SinglePopulationBasedAlgorithm
public Topology<? extends Entity> getTopology()
getTopology
in class SinglePopulationBasedAlgorithm
public void setTopology(Topology topology)
setTopology
in class SinglePopulationBasedAlgorithm
topology
- The Topology to be set.public void setOptimisationProblem(OptimisationProblem problem)
null
.
That is, it is necessary to set the optimisation problem before calling Algorithm.initialise()
.
setOptimisationProblem
in class Algorithm
problem
- An implementation of the
OptimisationProblemAdapter
interface.public OptimisationProblem getOptimisationProblem()
getOptimisationProblem
in class Algorithm
public OptimisationSolution getBestSolution()
getBestSolution
in class PopulationBasedAlgorithm
OptimisationSolution
representing the best solution.public IterationStrategy<EC> getIterationStrategy()
EC
.
public void setIterationStrategy(IterationStrategy iterationStrategy)
iterationStrategy
- The value to set.public List<OptimisationSolution> getSolutions()
getSolutions
in class PopulationBasedAlgorithm
Collection<OptimisationSolution>
containing the solutions.public Entity getContribution()
getContribution
in interface ParticipatingAlgorithm
public Fitness getContributionFitness()
getContributionFitness
in interface ParticipatingAlgorithm
public void updateContributionFitness(Fitness fitness)
updateContributionFitness
in interface ParticipatingAlgorithm
fitness
- The new fitness of the contribution.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |