|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.entity.AbstractEntity net.sourceforge.cilib.boa.bee.AbstractBee
public abstract class AbstractBee
The entity class for the ABC algorithm that represents the bees.
Field Summary | |
---|---|
protected int |
dimension
|
protected BeePositionUpdateStrategy |
positionUpdateStrategy
|
protected SelectionStrategy |
targetSelectionStrategy
|
Constructor Summary | |
---|---|
AbstractBee()
Default constructor. |
|
AbstractBee(AbstractBee copy)
Copy constructor. |
Method Summary | |
---|---|
void |
calculateFitness()
Calculate the fitness of the Entity incrementing the
number of fitness evaluations for the algorithm. |
void |
calculateFitness(boolean count)
Calculate the fitness of the Entity . |
int |
compareTo(Entity o)
|
abstract AbstractBee |
getClone()
Make a clone of the Entity the exact semantics of the clone method will be defined by the classes that implements this interface. |
int |
getDimension()
Returns the dimension of the Entity. |
Vector |
getPosition()
Gets the bee's position (contents). |
BeePositionUpdateStrategy |
getPositionUpdateStrategy()
Getter method for the position update strategy. |
void |
initialise(OptimisationProblem problem)
Intialise the Entity to something meaningful and within the problem space. |
void |
reinitialise()
Re-initialise the given Entity within the defined domain. |
void |
setPosition(Vector position)
Sets the bee's position (contents). |
abstract void |
updatePosition()
Updates the position of the bee based on the neighboring nectar content. |
Methods inherited from class net.sourceforge.cilib.entity.AbstractEntity |
---|
equals, getBestFitness, getCandidateSolution, getFitness, getFitnessCalculator, getId, getProperties, hashCode, setCandidateSolution, setFitnessCalculator, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.cilib.boa.bee.HoneyBee |
---|
getFitness |
Methods inherited from interface net.sourceforge.cilib.entity.Entity |
---|
getBestFitness, getCandidateSolution, getFitnessCalculator, getId, getProperties, setCandidateSolution, setProperties |
Field Detail |
---|
protected BeePositionUpdateStrategy positionUpdateStrategy
protected SelectionStrategy targetSelectionStrategy
protected int dimension
Constructor Detail |
---|
public AbstractBee()
public AbstractBee(AbstractBee copy)
copy
- the reference of the bee that is deep copied.Method Detail |
---|
public abstract AbstractBee getClone()
getClone
in interface HoneyBee
getClone
in interface Entity
getClone
in interface Cloneable
Object.clone()
public BeePositionUpdateStrategy getPositionUpdateStrategy()
getPositionUpdateStrategy
in interface HoneyBee
public abstract void updatePosition()
updatePosition
in interface HoneyBee
public void calculateFitness()
Entity
incrementing the
number of fitness evaluations for the algorithm.
calculateFitness
in interface Entity
public void calculateFitness(boolean count)
Entity
. This method may or may not
increment the number of fitness evaluations of the algorithm.
calculateFitness
in interface Entity
count
- Add or do not add this fitness evaluation to the algorithm global count.public int compareTo(Entity o)
compareTo
in interface Comparable<Entity>
compareTo
in interface Entity
public int getDimension()
getDimension
in interface Entity
public Vector getPosition()
getPosition
in interface HoneyBee
public void setPosition(Vector position)
setPosition
in interface HoneyBee
position
- The value to set.public void initialise(OptimisationProblem problem)
initialise
in interface Entity
problem
- The OptimisationProblem to based the initialisation on.public void reinitialise()
reinitialise
in interface Entity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |