public abstract class NumberChromosome<N extends Number<N>,G extends NumberGene<N,G>> extends AbstractChromosome<G>
| Modifier and Type | Field and Description |
|---|---|
protected N |
_max
The maximum value of this
NumberChromosome. |
protected N |
_min
The minimum value of this
NumberChromosome. |
_genes, _valid| Modifier | Constructor and Description |
|---|---|
protected |
NumberChromosome(ISeq<? extends G> genes)
Create a new chromosome from the given genes array.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
byteValue()
Return the byte value of this
NumberChromosome at the
index 0. |
byte |
byteValue(int index)
Return the byte value of this
NumberChromosome at the given
index. |
double |
doubleValue()
Return the double value of this
NumberChromosome at the
index 0. |
double |
doubleValue(int index)
Return the double value of this
NumberChromosome at the given
index. |
boolean |
equals(Object object) |
float |
floatValue()
Return the float value of this
NumberChromosome at the
index 0. |
float |
floatValue(int index)
Return the float value of this
NumberChromosome at the given
index. |
N |
getMax()
Return the maximum value of this
NumberChromosome. |
N |
getMin()
Return the minimum value of this
NumberChromosome. |
int |
hashCode() |
int |
intValue()
Return the int value of this
NumberChromosome at the
index 0. |
int |
intValue(int index)
Return the int value of this
NumberChromosome at the given
index. |
long |
longValue()
Return the long value of this
NumberChromosome at the
index 0. |
long |
longValue(int index)
Return the long value of this
NumberChromosome at the given
index. |
short |
shortValue()
Return the short value of this
NumberChromosome at the
index 0. |
short |
shortValue(int index)
Return the short value of this
NumberChromosome at the given
index. |
getGene, getGene, indexOf, isValid, iterator, length, toSeq, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitnewInstancenewInstanceprotected 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.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.Gene with index 0.public short shortValue(int index)
NumberChromosome at the given
index.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.Gene with index 0.public int intValue(int index)
NumberChromosome at the given
index.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.Gene with index 0.public long longValue(int index)
NumberChromosome at the given
index.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.Gene with index 0.public float floatValue(int index)
NumberChromosome at the given
index.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.Gene with index 0.public double doubleValue(int index)
NumberChromosome at the given
index.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.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-2013 Franz Wilhelmstötter (2013-12-18 20:17)