Packages

final class IdealInt extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IdealInt
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def %(that: IdealInt): IdealInt

    Remainder of IdealInt.

    Remainder of IdealInt. We use Euclidian division with remainder, i.e., the property this == (this / that) * that + (this % that) holds, and this % that >= 0 and this % that < that.abs.

    TODO: make this more efficient

  4. def &(that: IdealInt): IdealInt

    Bit-wise and.

  5. def *(that: IdealInt): IdealInt

    Multiplication of IdealInt

  6. def +(that: IdealInt): IdealInt

    Addition of IdealInt

  7. def -(that: IdealInt): IdealInt

    Subtraction of IdealInt

  8. def /(that: IdealInt): IdealInt

    Division of IdealInt.

    Division of IdealInt. We use Euclidian division with remainder, i.e., the property this == (this / that) * that + (this % that) holds, and this % that >= 0 and this % that < that.abs.

    TODO: make this more efficient

  9. 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 property this == (this / that) * that + (this % that) holds, and this % that >= 0 and this % that < that.abs.

  10. def <(that: IdealInt): Boolean

    Less-than of IdealInt

  11. def <=(that: IdealInt): Boolean

    Less-than-or-equals comparison of IdealInt

  12. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def >(that: IdealInt): Boolean

    Greater-than comparison of IdealInt

  14. def >=(that: IdealInt): Boolean

    Greater-than-or-equals comparison of IdealInt

  15. def ^(that: IdealInt): IdealInt

    Bit-wise xor.

  16. def abs: IdealInt

    Returns the absolute value of this IdealInt

  17. 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 guarantees this == (this / that) * that + (this % that), and that the absolute value of (this % that) is less than the absolute value of that.

  18. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  19. def bigIntValue: BigInteger

    Converts this IdealInt to an BigInt.

  20. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  21. def compare(that: IdealInt): Int

    Compares this IdealInt with the specified IdealInt

  22. 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 < ...

  23. def divides(that: IdealInt): Boolean

    Return whether this divides that

  24. def doubleValue: Double
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(that: IdealInt): Boolean

    Compares this IdealInt with the specified IdealInt for equality.

  27. 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
  28. def floatValue: Float
  29. def gcd(that: IdealInt): IdealInt

    Returns the greatest common divisor of abs(this) and abs(that)

  30. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  31. def getHighestSetBit: Int
  32. def hashCode(): Int

    Returns the hash code for this IdealInt.

    Returns the hash code for this IdealInt.

    Definition Classes
    IdealInt → AnyRef → Any
  33. def intValue: Int

    Converts this IdealInt to an int.

    Converts this IdealInt to an int. If the IdealInt 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 the IdealInt value as well as return a result with the opposite sign.

  34. def intValueSafe: Int
  35. def invert: IdealInt

    Bit-wise inversion of this IdealInt

  36. def isAbsMinMod(that: IdealInt): Boolean

    Return whether this is minimal (in the compareAbs order) modulo that, i.e., if that is zero or if (this compareAbs (this + a*that)) <= 0 for all non-zero a

  37. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  38. def isMinusOne: Boolean

    Returns true iff this IdealInt is -one

  39. def isOne: Boolean

    Returns true iff this IdealInt is one

  40. def isProbablePrime(certainty: Int): Boolean

    Function corresponding to BigInteger.isProbablePrime

  41. def isUnit: Boolean

    Returns true iff this IdealInt is one or -one

  42. def isZero: Boolean

    Returns true iff this IdealInt is zero

  43. def lcm(that: IdealInt): IdealInt

    Returns the least common multiple of abs(this) and abs(that)

  44. def longValue: Long

    Converts this IdealInt to a long.

    Converts this IdealInt to a long. If the IdealInt 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 the IdealInt value as well as return a result with the opposite sign.

  45. def max(that: IdealInt): IdealInt

    Returns the maximum of this and that

  46. def min(that: IdealInt): IdealInt

    Returns the minimum of this and that

  47. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  48. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  49. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  50. def pow(exp: Int): IdealInt

    Returns a IdealInt whose value is (this raised to the power of exp).

  51. def powMod(exp: IdealInt, modulus: IdealInt): IdealInt

    Returns a IdealInt whose value is (this raised to the power of exp), modulo modulus.

  52. def reduceAbs(that: IdealInt): (IdealInt, IdealInt)

    Reduce this by adding a multiple of that and return the quotient and the remainder.

    Reduce this by adding a multiple of that and return the quotient and the remainder. In contrast to /%, reduction is done so that the remainder becomes minimal in the order compareAbs. The result has the properties this == quot * that + rem and (rem compareAbs (rem + a*that)) < 0 for all non-zero a.

  53. 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

  54. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  55. def toString(): String

    Returns the decimal String representation of this IdealInt.

    Returns the decimal String representation of this IdealInt.

    Definition Classes
    IdealInt → AnyRef → Any
  56. def unary_-: IdealInt

    Returns a IdealInt whose value is the negation of this IdealInt

  57. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  58. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  59. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  60. def |(that: IdealInt): IdealInt

    Bit-wise or.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped