|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Individual
This interface defines the methods for individual objects. Individuals are intended to be a container class that includes a genotype, a fitness object, a phenotype, and a mapper. It doesnt really need to do a lot beyond implementing a map() method, which predictably enough maps from genotype to a phenotype.
Method Summary | |
---|---|
Individual |
clone()
Clone the individual |
int |
getAge()
The age of the individual, counted as how many iterations it has survived. |
Fitness |
getFitness()
Get fitness of individuals |
Genotype |
getGenotype()
Get the genotype |
Mapper |
getMapper()
Get the map use to map input and output |
Phenotype |
getPhenotype()
Get phenotype |
java.lang.String |
getPhenotypeString(int map)
Get a String representation of the output(Phenotype) |
boolean |
isEvaluated()
Has the individual been evaluated |
boolean |
isValid()
Get the validity of the individual |
void |
map(int map)
Map the input(Genotype) to output(Phenotype) using a grammar as a map |
void |
setAge(int age)
Age is how long the individual has existed |
void |
setEvaluated(boolean b)
Indicate if the individual should be evaluated or not |
void |
setFitness(Fitness f)
Set fitness |
void |
setGenotype(Genotype g)
Set genotype |
void |
setMapper(Mapper m)
Set mapper |
void |
setPhenotype(Phenotype p)
Set phenotype |
void |
setValid(boolean b)
Set the validity of the individual |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
void map(int map)
map
- which input to map if there are multipleFitness getFitness()
Genotype getGenotype()
Mapper getMapper()
Phenotype getPhenotype()
java.lang.String getPhenotypeString(int map)
map
- which output to get if there are multiple
void setFitness(Fitness f)
f
- fitnessvoid setGenotype(Genotype g)
g
- genotypevoid setMapper(Mapper m)
m
- mappervoid setPhenotype(Phenotype p)
p
- phenotypeboolean isEvaluated()
void setEvaluated(boolean b)
b
- set if individual should be evaluatedboolean isValid()
void setValid(boolean b)
b
- validity to be setIndividual clone()
void setAge(int age)
age
- How long the individual has existedint getAge()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |