|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.solve.genetic.genome.BasicGenome
public abstract class BasicGenome
A basic abstract genome. Provides base functionality.
| Constructor Summary | |
|---|---|
BasicGenome(GeneticAlgorithm geneticAlgorithm)
Construct a basic genome. |
|
| Method Summary | |
|---|---|
int |
calculateGeneCount()
|
int |
compareTo(Genome other)
|
double |
getAdjustedScore()
Get the adjusted score, this considers old-age penalties and youth bonuses. |
double |
getAmountToSpawn()
|
List<Chromosome> |
getChromosomes()
|
GeneticAlgorithm |
getGeneticAlgorithm()
|
long |
getGenomeID()
|
Object |
getOrganism()
|
double |
getScore()
|
void |
mate(Genome father,
Genome child1,
Genome child2)
Mate two genomes. |
void |
setAdjustedScore(double adjustedScore)
Set the adjusted score. |
void |
setAmountToSpawn(double amountToSpawn)
Set the amount to spawn. |
void |
setGeneticAlgorithm(GeneticAlgorithm ga)
Set the genetic algorithm to use. |
void |
setGenomeID(long genomeID)
Set the genome id. |
void |
setOrganism(Object organism)
Set the organism. |
void |
setScore(double score)
Set the score. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.encog.solve.genetic.genome.Genome |
|---|
decode, encode |
| Constructor Detail |
|---|
public BasicGenome(GeneticAlgorithm geneticAlgorithm)
geneticAlgorithm - | Method Detail |
|---|
public int calculateGeneCount()
calculateGeneCount in interface Genomepublic int compareTo(Genome other)
compareTo in interface Comparable<Genome>public double getAdjustedScore()
Genome
getAdjustedScore in interface Genomepublic double getAmountToSpawn()
getAmountToSpawn in interface Genomepublic List<Chromosome> getChromosomes()
getChromosomes in interface Genomepublic GeneticAlgorithm getGeneticAlgorithm()
public long getGenomeID()
getGenomeID in interface Genomepublic Object getOrganism()
getOrganism in interface Genomepublic double getScore()
getScore in interface Genome
public void mate(Genome father,
Genome child1,
Genome child2)
mate in interface Genomefather - The father.child1 - The first child.child2 - The second child.public void setAdjustedScore(double adjustedScore)
setAdjustedScore in interface GenomeadjustedScore - The score.public void setAmountToSpawn(double amountToSpawn)
setAmountToSpawn in interface GenomeamountToSpawn - The amount to spawn.public void setGeneticAlgorithm(GeneticAlgorithm ga)
ga - The genetic algorithm to use.public void setGenomeID(long genomeID)
setGenomeID in interface GenomegenomeID - the genome id.public void setOrganism(Object organism)
organism - The organism.public void setScore(double score)
setScore in interface Genomescore - Set the score.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||