Class/Object

ap.basetypes

IdealInt

Related Docs: object IdealInt | package basetypes

Permalink

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

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def %(that: IdealInt): IdealInt

    Permalink

    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

    Permalink

    Bit-wise and.

  5. def *(that: IdealInt): IdealInt

    Permalink

    Multiplication of IdealInt

    Multiplication of IdealInt

  6. def +(that: IdealInt): IdealInt

    Permalink

    Addition of IdealInt

    Addition of IdealInt

  7. def -(that: IdealInt): IdealInt

    Permalink

    Subtraction of IdealInt

    Subtraction of IdealInt

  8. def /(that: IdealInt): IdealInt

    Permalink

    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)

    Permalink

    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

    Permalink

    Less-than of IdealInt

    Less-than of IdealInt

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

    Permalink

    Less-than-or-equals comparison of IdealInt

    Less-than-or-equals comparison of IdealInt

  12. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def >(that: IdealInt): Boolean

    Permalink

    Greater-than comparison of IdealInt

    Greater-than comparison of IdealInt

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

    Permalink

    Greater-than-or-equals comparison of IdealInt

    Greater-than-or-equals comparison of IdealInt

  15. def ^(that: IdealInt): IdealInt

    Permalink

    Bit-wise xor.

  16. def abs: IdealInt

    Permalink

    Returns the absolute value of this IdealInt

    Returns the absolute value of this IdealInt

  17. def anyDivideAndRemainder(that: IdealInt): (IdealInt, IdealInt)

    Permalink

    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

    Permalink
    Definition Classes
    Any
  19. def bigIntValue: BigInteger

    Permalink

    Converts this IdealInt to an BigInt.

    Converts this IdealInt to an BigInt.

  20. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  21. def compare(that: IdealInt): Int

    Permalink

    Compares this IdealInt with the specified IdealInt

    Compares this IdealInt with the specified IdealInt

  22. def compareAbs(that: IdealInt): Int

    Permalink

    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

    Permalink

    Return whether this divides that

  24. def doubleValue: Double

    Permalink
  25. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. def equals(that: IdealInt): Boolean

    Permalink

    Compares this IdealInt with the specified IdealInt for equality.

    Compares this IdealInt with the specified IdealInt for equality.

  27. def equals(that: Any): Boolean

    Permalink

    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

    Permalink
  29. def gcd(that: IdealInt): IdealInt

    Permalink

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

  30. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  31. def getHighestSetBit: Int

    Permalink
  32. def hashCode(): Int

    Permalink

    Returns the hash code for this IdealInt.

    Returns the hash code for this IdealInt.

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

    Permalink

    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

    Permalink
  35. def isAbsMinMod(that: IdealInt): Boolean

    Permalink

    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

    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

  36. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  37. def isMinusOne: Boolean

    Permalink

    Returns true iff this IdealInt is -one

    Returns true iff this IdealInt is -one

  38. def isOne: Boolean

    Permalink

    Returns true iff this IdealInt is one

    Returns true iff this IdealInt is one

  39. def isProbablePrime(certainty: Int): Boolean

    Permalink

    Function corresponding to BigInteger.isProbablePrime

    Function corresponding to BigInteger.isProbablePrime

  40. def isUnit: Boolean

    Permalink

    Returns true iff this IdealInt is one or -one

    Returns true iff this IdealInt is one or -one

  41. def isZero: Boolean

    Permalink

    Returns true iff this IdealInt is zero

    Returns true iff this IdealInt is zero

  42. def lcm(that: IdealInt): IdealInt

    Permalink

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

  43. def longValue: Long

    Permalink

    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.

  44. def max(that: IdealInt): IdealInt

    Permalink

    Returns the maximum of this and that

  45. def min(that: IdealInt): IdealInt

    Permalink

    Returns the minimum of this and that

  46. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  47. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  48. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  49. def pow(exp: Int): IdealInt

    Permalink

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

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

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

    Permalink

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

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

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

    Permalink

    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.

  52. def signum: Int

    Permalink

    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

  53. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  54. def toString(): String

    Permalink

    Returns the decimal String representation of this IdealInt.

    Returns the decimal String representation of this IdealInt.

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

    Permalink

    Returns a IdealInt whose value is the negation of this IdealInt

    Returns a IdealInt whose value is the negation of this IdealInt

  56. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. def |(that: IdealInt): IdealInt

    Permalink

    Bit-wise or.

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped