|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectIndividuals.AbstractIndividual
public abstract class AbstractIndividual
An Abstract individual. An abstract individual class implements a couple of the get/set patterns and adds a fitness data member.
| Field Summary | |
|---|---|
protected int |
age
|
protected boolean |
evaluated
|
protected Fitness |
fitness
|
protected java.util.List<java.lang.Integer> |
parentUIDs
|
| Method Summary | |
|---|---|
abstract Individual |
clone()
Clone the individual |
int |
compareTo(Individual o)
Compare the indivdual |
int |
getAge()
The age of the individual, counted as how many iterations it has survived. |
Fitness |
getFitness()
Get fitness of individuals |
abstract Genotype |
getGenotype()
Get the genotype |
abstract Mapper |
getMapper()
Get the map use to map input and output |
java.util.List<java.lang.Integer> |
getParentUIDs()
Get the parentUIDs |
abstract Phenotype |
getPhenotype()
Get phenotype |
abstract java.lang.String |
getPhenotypeString(int map)
Get a String representation of the output(Phenotype) |
int |
getUID()
Use: @{inheritDoc} |
int |
increaseUIDCounter()
Increase the unique id counter and return the new counter value |
boolean |
isEvaluated()
Has the individual been evaluated |
abstract 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 |
abstract void |
setGenotype(Genotype g)
Set genotype |
abstract void |
setMapper(Mapper m)
Set mapper |
void |
setParentUIDs(java.util.List<java.lang.Integer> _parentUIDs)
Set the parentUIDs |
abstract void |
setPhenotype(Phenotype p)
Set phenotype |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface Individuals.Individual |
|---|
isValid, setValid |
| Field Detail |
|---|
protected Fitness fitness
protected boolean evaluated
protected int age
protected java.util.List<java.lang.Integer> parentUIDs
| Method Detail |
|---|
public abstract void map(int map)
Individual
map in interface Individualmap - which input to map if there are multiplepublic abstract java.lang.String getPhenotypeString(int map)
Individual
getPhenotypeString in interface Individualmap - which output to get if there are multiple
public abstract Mapper getMapper()
Individual
getMapper in interface Individualpublic abstract Genotype getGenotype()
Individual
getGenotype in interface Individualpublic abstract void setMapper(Mapper m)
Individual
setMapper in interface Individualm - mapperpublic abstract void setGenotype(Genotype g)
Individual
setGenotype in interface Individualg - genotypepublic abstract void setPhenotype(Phenotype p)
Individual
setPhenotype in interface Individualp - phenotypepublic abstract Phenotype getPhenotype()
Individual
getPhenotype in interface Individualpublic abstract Individual clone()
Individual
clone in interface Individualclone in class java.lang.Objectpublic int compareTo(Individual o)
compareTo in interface java.lang.Comparable<Individual>o - individual to compare to
public int getAge()
Individual
getAge in interface Individualpublic void setAge(int age)
Individual
setAge in interface Individualage - How long the individual has existedpublic Fitness getFitness()
Individual
getFitness in interface Individualpublic void setFitness(Fitness f)
Individual
setFitness in interface Individualf - fitnesspublic boolean isEvaluated()
Individual
isEvaluated in interface Individualpublic void setEvaluated(boolean b)
Individual
setEvaluated in interface Individualb - set if individual should be evaluatedpublic int getUID()
public int increaseUIDCounter()
public void setParentUIDs(java.util.List<java.lang.Integer> _parentUIDs)
_parentUIDs - List of parent UIDspublic java.util.List<java.lang.Integer> getParentUIDs()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||