| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectIndividual<T>
public class Individual<T>
An Individual is a sequence of genes. As an Individual could be exported out of a population and could have an independent existence, it contains all the information required for its interpretation.
| Constructor Summary | |
|---|---|
Individual(Gene[] genes,
           GeneGrammar<T> grammar)
 | 
|
| Method Summary | |
|---|---|
 void | 
calibrateFitness(Double d)
bring the fitness on a scale starting from 0  | 
 Individual<T> | 
clone()
get a deep copy of this individual  | 
 int | 
compareTo(Individual<T> another)
 | 
 String | 
decode()
explain this individual in a human readable form.  | 
 double | 
evaluateFitness(List<FitnessCase<T>> fitnessCases)
This method evaluates afresh the fitness of this individual by building and evaluating the Abstarct Syntax Tree.  | 
 double | 
getCalibratedFitness()
 | 
 int | 
getChromosomeLength()
get the sum of lengths of all genes  | 
 double | 
getFitness()
 | 
 int | 
getGeneLength()
 | 
 Gene[] | 
getGenes()
 | 
 GeneGrammar<T> | 
getGrammar()
 | 
 int | 
getHeadLength()
 | 
 int | 
getNumberOfGenes()
 | 
 String | 
toString()
 | 
 List<T> | 
useOn(List<FitnessCase<T>> fitnessCases)
use this Individual to calculate the the values for given fitness cases.  | 
| Methods inherited from class Object | 
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public Individual(Gene[] genes,
                  GeneGrammar<T> grammar)
| Method Detail | 
|---|
public double evaluateFitness(List<FitnessCase<T>> fitnessCases)
                       throws AmibaException
AmibaExceptionpublic double getFitness()
public int getNumberOfGenes()
public int getChromosomeLength()
public int getHeadLength()
public int getGeneLength()
public Individual<T> clone()
clone in class Objectpublic String decode()
public String toString()
toString in class Objectpublic Gene[] getGenes()
public GeneGrammar<T> getGrammar()
public int compareTo(Individual<T> another)
compareTo in interface Comparable<Individual<T>>public void calibrateFitness(Double d)
public double getCalibratedFitness()
public List<T> useOn(List<FitnessCase<T>> fitnessCases)
              throws AmibaException
AmibaException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||