simbad.picoevo.core.representation
Class Individual
java.lang.Object
simbad.picoevo.core.representation.EvolutionObject
simbad.picoevo.core.representation.Individual
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable, EvaluationInterface, InitialisationInterface
- Direct Known Subclasses:
- Individual_NEATIndividual, Individual_SimpleIndividual
public abstract class Individual
- extends EvolutionObject
- implements InitialisationInterface, EvaluationInterface, java.lang.Cloneable, java.lang.Comparable
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_populationOwner
public Population _populationOwner
_elementList
protected java.util.ArrayList _elementList
_isEvaluated
protected boolean _isEvaluated
_fitness
protected double _fitness
Individual
public Individual(java.lang.String __name,
Population __populationOwner)
Individual
public Individual(Population __populationOwner)
performInitialisation
public void performInitialisation()
- initialise this individual
- Specified by:
performInitialisation
in interface InitialisationInterface
getFitness
public double getFitness()
- Returns:
- return the fitness value
setFitness
public void setFitness(double __d)
updateFitness
public void updateFitness(double __value)
- update the fitness value by adding the new value
setEvaluationFlag
protected void setEvaluationFlag(boolean __value)
getElementAt
public Element getElementAt(int __index)
getElementListSize
public int getElementListSize()
isEvaluated
public boolean isEvaluated()
setPopulationSpace
public void setPopulationSpace(Population __populationSpace)
performVariations
public void performVariations()
- Description copied from class:
EvolutionObject
- This method is called recursively from the entry point towards the smallest element (if any). smaller elements are variated first.
- Specified by:
performVariations
in class EvolutionObject
performEvaluation
public void performEvaluation()
- Specified by:
performEvaluation
in interface EvaluationInterface
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
addElement
public abstract void addElement(Element __element)
compareTo
public int compareTo(java.lang.Object __o)
- Specified by:
compareTo
in interface java.lang.Comparable
- Parameters:
-
getTemplate
public final ParameterSet getTemplate()
getOwner
public final Population getOwner()
trace
public void trace()
- Trace elements directly (and possibly indirectly) related to this individual - no return value.
By default, this method performs nothing -- however, descendant classes may overwrite this method to perform user-specified code.
e.g.: specific operator/terminal code for post-evaluation monitoring purpose.