|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Gene
Base interface for a gene data model in a genome.
A gene provides the following operators and functions:
Nested Class Summary | |
---|---|
static class |
Gene.BitSet
Bit string gene. |
static class |
Gene.BoundedFloat
Bounded floating point gene data. |
static class |
Gene.BoundedInteger
Bounded integer gene data. |
static class |
Gene.Fixed
Fixed point gene data. |
static class |
Gene.Float
Floating point gene data. |
static class |
Gene.Integer
Integer gene data. |
static class |
Gene.List
Represents a container gene that contains a list of other genes. |
static class |
Gene.Number
Numeric gene data. |
Method Summary | |
---|---|
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)
|
java.lang.Object |
get()
Get the gene interpretation value. |
int |
hashCode()
|
Gene |
inverse()
Get an inverted version of this Gene. |
Gene |
mutate(double probability)
Get a mutated version of this Gene. |
Gene[] |
recombine(Gene[] parents,
int childrenCount,
double recombinationProbability)
Genetically recombine gene data of parents to their children via reproduction. |
void |
set(java.lang.Object value)
Set the gene value. |
Method Detail |
---|
java.lang.Object clone()
boolean equals(java.lang.Object o)
equals
in class java.lang.Object
int hashCode()
hashCode
in class java.lang.Object
java.lang.Object get()
Useful for interpreting a gene for fitness evaluation and interpretation of solutions.
void set(java.lang.Object value)
Consider setting fitness to Double.NaN
due to the change to remind evaluator.
value
- the Object this gene should represent.
Encodes the value such that this gene represents the given object.Gene mutate(double probability)
probability
- the probability rating of mutation level.
f.ex. probability with that each bit of the Gene mutates.
Gene[] recombine(Gene[] parents, int childrenCount, double recombinationProbability)
a a = direct ancestors to be used n * --- ; n = number of children to be produced p p = probability for each part of parent's Gene to be inherited a/p = elongation of Gene length n/a = growth of population size if n/a < 1 the population is contracting. if n/a = 1 the population size is fixed. if n/a > 1 the population is growing.Usually it is p=n/a.
parents
- the Genes to be used as parents for the children.
a
is the number of parents (direct ancestors).
parents are readonly.childrenCount
- the number of Gene children to produce and return.
n
is the number of children to be produced.recombinationProbability
- the probability with that parts of the inherited gene data
is recombined.
This does not necessarily imply an exchange of data, Genes might as well
realign or repair at random. But it makes a data recombination possible.
childrenCount
children produced.Gene inverse()
Used in Population.create(Population, Genome, int)
to form a balanced
and least biased initial population.
Metric distanceMeasure()
Used to determine how different two genes are.
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |