|
Orbital library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Number
orbital.algorithm.evolutionary.Gene.Number
public abstract static class Gene.Number
Numeric gene data.
This class is the base class for gene data with a numeric interpretation.
Note however, that all numeric genes could as well be encoded with a mere bit string. Although default uniform mutations and recombination would then have a dramatic effect on these bit string encoded values. This is the reason for introducing explicit genes with numeric interpretations.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface orbital.algorithm.evolutionary.Gene |
|---|
Gene.BitSet, Gene.BoundedFloat, Gene.BoundedInteger, Gene.Fixed, Gene.Float, Gene.Integer, Gene.List, Gene.Number |
| Constructor Summary | |
|---|---|
Gene.Number()
|
|
| Method Summary | |
|---|---|
abstract java.lang.Object |
clone()
Returns a clone of this gene. |
Metric |
distanceMeasure()
Get the distance measure for this class. |
boolean |
equals(java.lang.Object o)
Checks two gene numbers for equality according to their doubleValue. |
float |
floatValue()
|
int |
hashCode()
Calculates a hash code according to the doubleValue. |
int |
intValue()
|
Gene |
inverse()
Get an inverted version of this Gene. |
long |
longValue()
|
Gene |
mutate(double probability)
Get a mutated version of this Gene. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Number |
|---|
byteValue, doubleValue, shortValue |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface orbital.algorithm.evolutionary.Gene |
|---|
get, recombine, set |
| Constructor Detail |
|---|
public Gene.Number()
| Method Detail |
|---|
public abstract java.lang.Object clone()
Gene
clone in interface Geneclone in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface Geneequals in class java.lang.Objectpublic int hashCode()
hashCode in interface GenehashCode in class java.lang.Objectpublic int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic java.lang.String toString()
toString in class java.lang.Objectpublic Gene inverse()
Gene
Used in Population.create(Population, Genome, int) to form a balanced
and least biased initial population.
inverse in interface Genepublic Gene mutate(double probability)
Gene
mutate in interface Geneprobability - the probability rating of mutation level.
f.ex. probability with that each bit of the Gene mutates.
public Metric distanceMeasure()
GeneUsed to determine how different two genes are.
distanceMeasure in interface Gene
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||