AbstractNumericChromosome
instead. This classes
uses the JScience library, which will be removed in the
next major version.@Deprecated public abstract class NumberChromosome<N extends Number<N>,G extends NumberGene<N,G>> extends AbstractChromosome<G> implements NumericChromosome<N,G>
Modifier and Type | Field and Description |
---|---|
protected N |
_max
Deprecated.
The maximum value of this
NumberChromosome . |
protected N |
_min
Deprecated.
The minimum value of this
NumberChromosome . |
_genes, _valid
Modifier | Constructor and Description |
---|---|
protected |
NumberChromosome(ISeq<? extends G> genes)
Deprecated.
Create a new chromosome from the given genes array.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteValue()
Deprecated.
Return the byte value of this
NumberChromosome at the
index 0. |
byte |
byteValue(int index)
Deprecated.
Return the byte value of this
NumberChromosome at the given
index . |
double |
doubleValue()
Deprecated.
Return the double value of this
NumberChromosome at the
index 0. |
double |
doubleValue(int index)
Deprecated.
Return the double value of this
NumberChromosome at the given
index . |
boolean |
equals(Object object)
Deprecated.
|
float |
floatValue()
Deprecated.
Return the float value of this
NumberChromosome at the
index 0. |
float |
floatValue(int index)
Deprecated.
Return the float value of this
NumberChromosome at the given
index . |
N |
getMax()
Deprecated.
Return the maximum value of this
NumberChromosome . |
N |
getMin()
Deprecated.
Return the minimum value of this
NumberChromosome . |
int |
hashCode()
Deprecated.
|
int |
intValue()
Deprecated.
Return the int value of this
NumberChromosome at the
index 0. |
int |
intValue(int index)
Deprecated.
Return the int value of this
NumberChromosome at the given
index . |
long |
longValue()
Deprecated.
Return the long value of this
NumberChromosome at the
index 0. |
long |
longValue(int index)
Deprecated.
Return the long value of this
NumberChromosome at the given
index . |
short |
shortValue()
Deprecated.
Return the short value of this
NumberChromosome at the
index 0. |
short |
shortValue(int index)
Deprecated.
Return the short value of this
NumberChromosome at the given
index . |
getGene, getGene, indexOf, isValid, iterator, length, toSeq, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getGene, getGene, length, newInstance, toSeq
isValid
newInstance
protected transient N extends Number<N> _min
NumberChromosome
.protected NumberChromosome(ISeq<? extends G> genes)
genes
- the genes of the new chromosome.IllegalArgumentException
- if the genes.length()
is smaller
than one.NullPointerException
- if the genes
are null
.public N getMin()
NumberChromosome
.NumberChromosome
.public N getMax()
NumberChromosome
.NumberChromosome
.public byte byteValue(int index)
NumberChromosome
at the given
index
.byteValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
index
- the index of the NumberGene
.Gene
with the given index
.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= length()).public byte byteValue()
NumberChromosome
at the
index
0.byteValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
Gene
with index
0.public short shortValue(int index)
NumberChromosome
at the given
index
.shortValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
index
- the index of the NumberGene
.Gene
with the given index
.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= length()).public short shortValue()
NumberChromosome
at the
index
0.shortValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
Gene
with index
0.public int intValue(int index)
NumberChromosome
at the given
index
.intValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
index
- the index of the NumberGene
.Gene
with the given index
.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= length()).public int intValue()
NumberChromosome
at the
index
0.intValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
Gene
with index
0.public long longValue(int index)
NumberChromosome
at the given
index
.longValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
index
- the index of the NumberGene
.Gene
with the given index
.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= length()).public long longValue()
NumberChromosome
at the
index
0.longValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
Gene
with index
0.public float floatValue(int index)
NumberChromosome
at the given
index
.floatValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
index
- the index of the NumberGene
.Gene
with the given index
.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= length()).public float floatValue()
NumberChromosome
at the
index
0.floatValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
Gene
with index
0.public double doubleValue(int index)
NumberChromosome
at the given
index
.doubleValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
index
- the index of the NumberGene
.Gene
with the given index
.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= length()).public double doubleValue()
NumberChromosome
at the
index
0.doubleValue
in interface NumericChromosome<N extends Number<N>,G extends NumberGene<N,G>>
Gene
with index
0.public int hashCode()
hashCode
in class AbstractChromosome<G extends NumberGene<N,G>>
public boolean equals(Object object)
equals
in class AbstractChromosome<G extends NumberGene<N,G>>
© 2007-2014 Franz Wilhelmstötter (2014-03-07 19:35)