public class Individual
extends java.lang.Object
implements java.lang.Cloneable
| Constructor and Description |
|---|
Individual(java.lang.String fileName)
Constructs an Individual purely from an Individual stored in an XML file.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
clone()
A proper clone also cloning Genotype (including all Chromosomes) and Phenotype.
|
double |
getFitness()
Get the fitness of the phenotype.
|
java.util.List<Chromosome> |
getGenotype()
Supplies the Individual's Genotype.
|
Phenotype |
getPhenotype()
Supplies the Individual's Phenotype.
|
void |
toFile(java.lang.String fileName)
Saves the Individual to an XML file.
|
java.lang.String |
toString()
Convert Individual's Genotype to a string.
|
public Individual(java.lang.String fileName)
fileName - name of the XML fileprotected java.lang.Object clone()
clone in class java.lang.Objectpublic double getFitness()
public java.util.List<Chromosome> getGenotype()
public Phenotype getPhenotype()
public java.lang.String toString()
toString in class java.lang.Objectpublic void toFile(java.lang.String fileName)
fileName - name of the XML file