Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core
Class AbstractIndividual

java.lang.Object
  extended byorg.evolvica.core.AbstractIndividual
All Implemented Interfaces:
IIndividual, java.io.Serializable
Direct Known Subclasses:
DefaultIndividual

public abstract class AbstractIndividual
extends java.lang.Object
implements IIndividual

Abstract base class for individuals.

Since:
0.4.0
Version:
$Revision: 1.4 $ $Date: 2004/05/26 11:57:51 $
Author:
Andreas Rummler
See Also:
Serialized Form

Field Summary
protected  IFitness fitness
          The fitness of this individual.
protected  IGenotype genotype
          The genotype of this individual.
protected  IPhenotypeBuilder phenoBuilder
          The phenotype builder that is used to create phenotypes for given genotypes.
protected  IPhenotype phenotype
          The phenotype of this individual.
protected  IScore score
          The associated score of this individual.
 
Constructor Summary
AbstractIndividual()
           
 
Method Summary
 IFitness getFitness()
          Returns the assigned fitness.
 IGenotype getGenotype()
          Returns the assigned genotype.
 IPhenotype getPhenotype()
          Returns the associated phenotype.
 IScore getScore()
          Returns the assigned score.
 void setFitness(IFitness fitness)
          Sets the fitness.
 void setGenotype(IGenotype genotype)
          Sets the genotype of this individual.
 void setScore(IScore score)
          Sets the score.
 java.lang.String toString()
          Returns a string representation of this individual.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

phenoBuilder

protected IPhenotypeBuilder phenoBuilder
The phenotype builder that is used to create phenotypes for given genotypes.


genotype

protected IGenotype genotype
The genotype of this individual.


phenotype

protected IPhenotype phenotype
The phenotype of this individual. A phenotype MAY be assigned but in general it is optional.


score

protected IScore score
The associated score of this individual.


fitness

protected IFitness fitness
The fitness of this individual. The fitness value is optional. Target objective functions should only calculate score values. The fitness value should only be used for mapping scores to non-negative range of values or assigned an additional rank or something similiar.

Constructor Detail

AbstractIndividual

public AbstractIndividual()
Method Detail

getGenotype

public IGenotype getGenotype()
Returns the assigned genotype. This methods may never return null.

Specified by:
getGenotype in interface IIndividual
Returns:
the genotype of this individual

setGenotype

public void setGenotype(IGenotype genotype)
Sets the genotype of this individual.

Specified by:
setGenotype in interface IIndividual
Parameters:
genotype - the genotype to set

getPhenotype

public IPhenotype getPhenotype()
Returns the associated phenotype.

Specified by:
getPhenotype in interface IIndividual
Returns:
phenotype or null if no phenotype has been assigned

getScore

public IScore getScore()
Returns the assigned score.

Specified by:
getScore in interface IIndividual
Returns:
score or null if no score has been assigned yet

setScore

public void setScore(IScore score)
Sets the score.

Specified by:
setScore in interface IIndividual
Parameters:
score - the score to set

getFitness

public IFitness getFitness()
Returns the assigned fitness.

Specified by:
getFitness in interface IIndividual
Returns:
fitness or null if no fitness has been assigned yet

setFitness

public void setFitness(IFitness fitness)
Sets the fitness.

Specified by:
setFitness in interface IIndividual
Parameters:
fitness - the fitness to set

toString

public java.lang.String toString()
Returns a string representation of this individual.

Returns:
string representation

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems