final class IdealInt extends AnyRef
- Alphabetic
- By Inheritance
- IdealInt
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def %(that: IdealInt): IdealInt
Remainder of
IdealInt
.Remainder of
IdealInt
. We use Euclidian division with remainder, i.e., the propertythis == (this / that) * that + (this % that)
holds, andthis % that >= 0
andthis % that < that.abs
.TODO: make this more efficient
- def &(that: IdealInt): IdealInt
Bit-wise and.
- def *(that: IdealInt): IdealInt
Multiplication of
IdealInt
- def +(that: IdealInt): IdealInt
Addition of
IdealInt
- def -(that: IdealInt): IdealInt
Subtraction of
IdealInt
- def /(that: IdealInt): IdealInt
Division of
IdealInt
.Division of
IdealInt
. We use Euclidian division with remainder, i.e., the propertythis == (this / that) * that + (this % that)
holds, andthis % that >= 0
andthis % that < that.abs
.TODO: make this more efficient
- def /%(that: IdealInt): (IdealInt, IdealInt)
Returns a pair of two
IdealInt
containing (this / that) and (this % that).Returns a pair of two
IdealInt
containing (this / that) and (this % that). We use Euclidian division with remainder, i.e., the propertythis == (this / that) * that + (this % that)
holds, andthis % that >= 0
andthis % that < that.abs
. - def <(that: IdealInt): Boolean
Less-than of
IdealInt
- def <=(that: IdealInt): Boolean
Less-than-or-equals comparison of
IdealInt
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def >(that: IdealInt): Boolean
Greater-than comparison of
IdealInt
- def >=(that: IdealInt): Boolean
Greater-than-or-equals comparison of
IdealInt
- def ^(that: IdealInt): IdealInt
Bit-wise xor.
- def abs: IdealInt
Returns the absolute value of this
IdealInt
- def anyDivideAndRemainder(that: IdealInt): (IdealInt, IdealInt)
Returns a pair of two
IdealInt
containing(this / that)
and(this % that)
.Returns a pair of two
IdealInt
containing(this / that)
and(this % that)
. This operation only guaranteesthis == (this / that) * that + (this % that)
, and that the absolute value of(this % that)
is less than the absolute value ofthat
. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bigIntValue: BigInteger
Converts this
IdealInt
to an BigInt. - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def compare(that: IdealInt): Int
Compares this
IdealInt
with the specifiedIdealInt
- def compareAbs(that: IdealInt): Int
A total order on integers that first compares the absolute value and then the sign: 0 < 1 < -1 < 2 < -2 < 3 < -3 < ...
- def divides(that: IdealInt): Boolean
Return whether this divides that
- def doubleValue: Double
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(that: IdealInt): Boolean
Compares this
IdealInt
with the specifiedIdealInt
for equality. - def equals(that: Any): Boolean
Compares this
IdealInt
with the specified value for equality.Compares this
IdealInt
with the specified value for equality.- Definition Classes
- IdealInt → AnyRef → Any
- def floatValue: Float
- def gcd(that: IdealInt): IdealInt
Returns the greatest common divisor of abs(this) and abs(that)
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def getHighestSetBit: Int
- def hashCode(): Int
Returns the hash code for this
IdealInt
.Returns the hash code for this
IdealInt
.- Definition Classes
- IdealInt → AnyRef → Any
- def intValue: Int
Converts this
IdealInt
to an int.Converts this
IdealInt
to an int. If theIdealInt
is too big to fit in a char, only the low-order 32 bits are returned. Note that this conversion can lose information about the overall magnitude of theIdealInt
value as well as return a result with the opposite sign. - def intValueSafe: Int
- def invert: IdealInt
Bit-wise inversion of this
IdealInt
- def isAbsMinMod(that: IdealInt): Boolean
Return whether
this
is minimal (in thecompareAbs
order) modulothat
, i.e., ifthat
is zero or if(this compareAbs (this + a*that)) <= 0
for all non-zeroa
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isMinusOne: Boolean
Returns
true
iff thisIdealInt
is -one - def isOne: Boolean
Returns
true
iff thisIdealInt
is one - def isProbablePrime(certainty: Int): Boolean
Function corresponding to
BigInteger.isProbablePrime
- def isUnit: Boolean
Returns
true
iff thisIdealInt
is one or -one - def isZero: Boolean
Returns
true
iff thisIdealInt
is zero - def lcm(that: IdealInt): IdealInt
Returns the least common multiple of abs(this) and abs(that)
- def longValue: Long
Converts this
IdealInt
to a long.Converts this
IdealInt
to a long. If theIdealInt
is too big to fit in a char, only the low-order 64 bits are returned. Note that this conversion can lose information about the overall magnitude of theIdealInt
value as well as return a result with the opposite sign. - def max(that: IdealInt): IdealInt
Returns the maximum of this and that
- def min(that: IdealInt): IdealInt
Returns the minimum of this and that
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def pow(exp: Int): IdealInt
Returns a
IdealInt
whose value is (this raised to the power of exp). - def powMod(exp: IdealInt, modulus: IdealInt): IdealInt
Returns a
IdealInt
whose value is (this raised to the power of exp), modulo modulus. - def reduceAbs(that: IdealInt): (IdealInt, IdealInt)
Reduce
this
by adding a multiple ofthat
and return the quotient and the remainder.Reduce
this
by adding a multiple ofthat
and return the quotient and the remainder. In contrast to/%
, reduction is done so that the remainder becomes minimal in the ordercompareAbs
. The result has the propertiesthis == quot * that + rem
and(rem compareAbs (rem + a*that)) < 0
for all non-zeroa
. - def signum: Int
Returns the sign of this
IdealInt
, i.e.Returns the sign of this
IdealInt
, i.e. -1 if it is less than 0, +1 if it is greater than 0 0 if it is equal to 0 - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
Returns the decimal
String
representation of thisIdealInt
.Returns the decimal
String
representation of thisIdealInt
.- Definition Classes
- IdealInt → AnyRef → Any
- def unary_-: IdealInt
Returns a
IdealInt
whose value is the negation of thisIdealInt
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def |(that: IdealInt): IdealInt
Bit-wise or.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)