|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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 Gene
clone
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in interface Gene
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface Gene
hashCode
in class java.lang.Object
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public java.lang.String toString()
toString
in class java.lang.Object
public Gene inverse()
Gene
Used in Population.create(Population, Genome, int)
to form a balanced
and least biased initial population.
inverse
in interface Gene
public Gene mutate(double probability)
Gene
mutate
in interface Gene
probability
- the probability rating of mutation level.
f.ex. probability with that each bit of the Gene mutates.
public Metric distanceMeasure()
Gene
Used 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 |