Class BigIntegerGene
java.lang.Object
io.jenetics.ext.BigIntegerGene
- All Implemented Interfaces:
BoundedGene<BigInteger, BigIntegerGene>, Gene<BigInteger, BigIntegerGene>, NumericGene<BigInteger, BigIntegerGene>, Factory<BigIntegerGene>, Mean<BigIntegerGene>, Self<BigIntegerGene>, Verifiable, Serializable, Comparable<BigIntegerGene>
public final class BigIntegerGene
extends Object
implements NumericGene<BigInteger, BigIntegerGene>, Mean<BigIntegerGene>, Serializable
Numeric chromosome implementation which holds an arbitrary sized integer
number.
This is a
value-based class; use of identity-sensitive operations (including
reference equality (==), identity hash code, or synchronization) on
instances of IntegerGene may have unpredictable results and should
be avoided.
- Since:
- 3.5
- Version:
- 6.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionallele()booleaninthashCode()max()mean(BigIntegerGene that) min()newInstance(Number number) newInstance(BigInteger value) static BigIntegerGeneof(BigInteger min, BigInteger max) Create a new randomBigIntegerGene.static BigIntegerGeneof(BigInteger value, BigInteger min, BigInteger max) Create a new randomBigIntegerGenewith the given value and the given range.toString()Methods inherited from interface BoundedGene
compareTo, isValid, max, minMethods inherited from interface NumericGene
byteValue, doubleValue, floatValue, intValue, longValue, shortValue
-
Method Details
-
allele
- Specified by:
allelein interfaceGene<BigInteger, BigIntegerGene>
-
min
- Specified by:
minin interfaceBoundedGene<BigInteger, BigIntegerGene>
-
max
- Specified by:
maxin interfaceBoundedGene<BigInteger, BigIntegerGene>
-
mean
- Specified by:
meanin interfaceMean<BigIntegerGene>
-
newInstance
- Specified by:
newInstancein interfaceNumericGene<BigInteger, BigIntegerGene>
-
newInstance
- Specified by:
newInstancein interfaceBoundedGene<BigInteger, BigIntegerGene>- Specified by:
newInstancein interfaceGene<BigInteger, BigIntegerGene>
-
newInstance
- Specified by:
newInstancein interfaceFactory<BigIntegerGene>- Specified by:
newInstancein interfaceGene<BigInteger, BigIntegerGene>
-
hashCode
-
equals
-
toString
-
of
Create a new randomBigIntegerGenewith the given value and the given range. If thevalueisn't within the interval [min, max), no exception is thrown. In this case the methodBoundedGene.isValid()returnsfalse.- Parameters:
value- the value of the gene.min- the minimal valid value of this gene (inclusively).max- the maximal valid value of this gene (exclusively).- Returns:
- a new random
BigIntegerGene - Throws:
NullPointerException- if one of the arguments isnull
-
of
Create a new randomBigIntegerGene. It is guaranteed that the value of theBigIntegerGenelies in the interval [min, max).- Parameters:
min- the minimal valid value of this gene (inclusively).max- the maximal valid value of this gene (exclusively).- Returns:
- a new random
BigIntegerGene - Throws:
NullPointerException- if one of the arguments isnull
-