net.sourceforge.cilib.algorithm.initialisation
Class PopulationInitialisationStrategy

java.lang.Object
  extended by net.sourceforge.cilib.algorithm.initialisation.PopulationInitialisationStrategy
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ClonedPopulationInitialisationStrategy, SpecializedPopluationInitialisationStrategy

public abstract class PopulationInitialisationStrategy
extends Object
implements Cloneable

Interface describing the manner in which populations are initialised.

Author:
Gary Pampara
See Also:
Serialized Form

Field Summary
protected  int entityNumber
           
 
Constructor Summary
PopulationInitialisationStrategy()
           
 
Method Summary
abstract  PopulationInitialisationStrategy getClone()
          Create a cloned copy of the current object and return it.
 int getEntityNumber()
          Get the number of entities specified to be created by the InitialisationStrategy.
abstract  Entity getEntityType()
          Get the current entity type.
abstract  void initialise(Topology<? extends Entity> topology, OptimisationProblem problem)
          Initialise the Entity collection based on the given Topology and Problem.
 void setEntityNumber(int entityNumber)
          Set the number of entities that are required.
abstract  void setEntityType(Entity entity)
          Set the entity type to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entityNumber

protected int entityNumber
Constructor Detail

PopulationInitialisationStrategy

public PopulationInitialisationStrategy()
Method Detail

getClone

public abstract PopulationInitialisationStrategy getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

setEntityNumber

public void setEntityNumber(int entityNumber)
Set the number of entities that are required.

Parameters:
entityNumber - The number of entities to set

setEntityType

public abstract void setEntityType(Entity entity)
Set the entity type to use.

Parameters:
entity - The entity type to use.

getEntityType

public abstract Entity getEntityType()
Get the current entity type.

Returns:
The entity being used.

initialise

public abstract void initialise(Topology<? extends Entity> topology,
                                OptimisationProblem problem)
Initialise the Entity collection based on the given Topology and Problem.

Parameters:
topology - The topology to initialise with Entity objects
problem - The Problem to based the initialisation on

getEntityNumber

public int getEntityNumber()
Get the number of entities specified to be created by the InitialisationStrategy.

Returns:
The number of entities to construct.


Copyright © 2009 CIRG. All Rights Reserved.