|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orbital.algorithm.evolutionary.Gene.BitSet orbital.algorithm.evolutionary.Gene.Fixed
public static class Gene.Fixed
Fixed point gene data.
This implementation uses a Gene.BitSet
encoded fixed-point numbers as gene data.
Note that default uniform mutations and recombinations have a dramatic effect on bit string encoded values.
Gene.Number
,
Serialized FormNested 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.Fixed(int integerGranularity,
int fractionalGranularity)
|
Method Summary | |
---|---|
java.lang.Object |
get()
Get the gene interpretation value. |
protected int |
getFractionalGranularity()
Get the number of bits for the fractional part. |
protected int |
getIntegerGranularity()
Get the number of bits for the integer part. |
protected int |
getSignGranularity()
Get the number of bits for the sign part. |
void |
set(java.lang.Object n)
Set the gene value. |
Methods inherited from class orbital.algorithm.evolutionary.Gene.BitSet |
---|
clone, distanceMeasure, equals, get, hashCode, inverse, length, mutate, recombine, set, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Gene.Fixed(int integerGranularity, int fractionalGranularity)
Method Detail |
---|
public java.lang.Object get()
Gene
Useful for interpreting a gene for fitness evaluation and interpretation of solutions.
get
in interface Gene
get
in class Gene.BitSet
public void set(java.lang.Object n)
Gene
Consider setting fitness to Double.NaN
due to the change to remind evaluator.
set
in interface Gene
set
in class Gene.BitSet
n
- the Object this gene should represent.
Encodes the value such that this gene represents the given object.protected int getIntegerGranularity()
protected int getFractionalGranularity()
protected int getSignGranularity()
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |