public class BigIntegerChromosome extends AbstractChromosome<BigIntegerGene> implements NumericChromosome<BigInteger,BigIntegerGene>, Serializable
_genes, _valid
Modifier | Constructor and Description |
---|---|
|
BigIntegerChromosome(BigInteger min,
BigInteger max)
Create a new random
DoubleChromosome of length one. |
|
BigIntegerChromosome(BigInteger min,
BigInteger max,
int length)
Create a new random
BigIntegerChromosome with the given
length . |
protected |
BigIntegerChromosome(ISeq<BigIntegerGene> genes)
Create a new chromosome from the given genes array.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
BigInteger |
getMax() |
BigInteger |
getMin() |
int |
hashCode() |
BigIntegerChromosome |
newInstance() |
BigIntegerChromosome |
newInstance(ISeq<BigIntegerGene> genes) |
static BigIntegerChromosome |
of(BigInteger min,
BigInteger max)
Create a new random
DoubleChromosome of length one. |
static BigIntegerChromosome |
of(BigInteger min,
BigInteger max,
int length)
Create a new random
DoubleChromosome . |
static BigIntegerChromosome |
of(BigIntegerGene... genes)
Create a new
DoubleChromosome with the given genes. |
getGene, isValid, iterator, length, toSeq, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
byteValue, byteValue, doubleValue, doubleValue, floatValue, floatValue, intValue, intValue, longValue, longValue, shortValue, shortValue
as, getGene, getGene, length, stream, toSeq
isValid
forEach, iterator, spliterator
protected BigIntegerChromosome(ISeq<BigIntegerGene> genes)
genes
- the genes of the new chromosome.IllegalArgumentException
- if the genes.length()
is smaller
than one.NullPointerException
- if the genes
are null
.IllegalArgumentException
- if the gene sequence is emptypublic BigIntegerChromosome(BigInteger min, BigInteger max, int length)
BigIntegerChromosome
with the given
length
.min
- the min value of the BigIntegerGene
s (inclusively).max
- the max value of the BigIntegerGene
s (inclusively).length
- the length of the chromosome.NullPointerException
- if one of the arguments is null
.IllegalArgumentException
- if the length
is smaller than
one.public BigIntegerChromosome(BigInteger min, BigInteger max)
DoubleChromosome
of length one.min
- the minimal value of this chromosome (inclusively).max
- the maximal value of this chromosome (exclusively).NullPointerException
- if one of the arguments is null
.public BigInteger getMin()
getMin
in interface BoundedChromosome<BigInteger,BigIntegerGene>
public BigInteger getMax()
getMax
in interface BoundedChromosome<BigInteger,BigIntegerGene>
public BigIntegerChromosome newInstance(ISeq<BigIntegerGene> genes)
newInstance
in interface Chromosome<BigIntegerGene>
public BigIntegerChromosome newInstance()
newInstance
in interface Factory<Chromosome<BigIntegerGene>>
public int hashCode()
hashCode
in class AbstractChromosome<BigIntegerGene>
public boolean equals(Object object)
equals
in class AbstractChromosome<BigIntegerGene>
public static BigIntegerChromosome of(BigIntegerGene... genes)
DoubleChromosome
with the given genes.genes
- the genes of the chromosome.IllegalArgumentException
- if the length of the genes array is
empty.NullPointerException
- if the given genes
array is
null
public static BigIntegerChromosome of(BigInteger min, BigInteger max, int length)
DoubleChromosome
.min
- the min value of the DoubleGene
s (inclusively).max
- the max value of the DoubleGene
s (exclusively).length
- the length of the chromosome.DoubleChromosome
with the given parameterpublic static BigIntegerChromosome of(BigInteger min, BigInteger max)
DoubleChromosome
of length one.min
- the minimal value of this chromosome (inclusively).max
- the maximal value of this chromosome (exclusively).DoubleChromosome
with the given parameter© 2007-2017 Franz Wilhelmstötter (2017-08-22 19:30)