|
||||||||||
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.cooperative.CooperativeEntity
public class CooperativeEntity
Field Summary | |
---|---|
protected Vector |
context
|
protected Fitness |
fitness
|
Constructor Summary | |
---|---|
CooperativeEntity()
|
|
CooperativeEntity(CooperativeEntity rhs)
|
Method Summary | |
---|---|
void |
append(Entity entity)
|
void |
append(Type value)
|
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)
|
boolean |
equals(Object object)
It doesn;t make sense to compare the meta data of the entity. |
StructuredType |
getCandidateSolution()
Get the value of the CandidateSolution maintained by this Entity. |
CooperativeEntity |
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. |
Fitness |
getFitness()
Get the fitness of the CandidateSolution maintained by this Entity. |
int |
hashCode()
|
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 |
reset()
|
void |
setCandidateSolution(Type type)
|
void |
setDimension(int dim)
|
void |
setFitness(Fitness f)
|
void |
update(Entity src,
int srcPos,
int dstPos,
int length)
|
Methods inherited from class net.sourceforge.cilib.entity.AbstractEntity |
---|
getBestFitness, getFitnessCalculator, getId, getProperties, setCandidateSolution, setFitnessCalculator, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Vector context
protected Fitness fitness
Constructor Detail |
---|
public CooperativeEntity()
public CooperativeEntity(CooperativeEntity rhs)
Method Detail |
---|
public CooperativeEntity getClone()
Entity
Object.clone()
public boolean equals(Object object)
AbstractEntity
equals
in class AbstractEntity
object
- The object to compare equality.public int hashCode()
AbstractEntity
hashCode
in class AbstractEntity
public void reset()
public int compareTo(Entity o)
Entity
public void append(Type value)
public void append(Entity entity)
public void update(Entity src, int srcPos, int dstPos, int length)
public StructuredType getCandidateSolution()
AbstractEntity
getCandidateSolution
in interface CandidateSolution
getCandidateSolution
in interface Entity
getCandidateSolution
in class AbstractEntity
public void setCandidateSolution(Type type)
public int getDimension()
Entity
public void setDimension(int dim)
public Fitness getFitness()
AbstractEntity
getFitness
in interface CandidateSolution
getFitness
in interface Entity
getFitness
in class AbstractEntity
public void setFitness(Fitness f)
public void initialise(OptimisationProblem problem)
Entity
problem
- The OptimisationProblem to based the initialisation on.public void reinitialise()
Entity
public void calculateFitness()
Entity
Entity
incrementing the
number of fitness evaluations for the algorithm.
public void calculateFitness(boolean count)
Entity
Entity
. This method may or may not
increment the number of fitness evaluations of the algorithm.
count
- Add or do not add this fitness evaluation to the algorithm global count.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |