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
    @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 finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. def floatValue: Float

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

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  32. def getHighestSetBit: Int

    Permalink
  33. def hashCode(): Int

    Permalink

    Returns the hash code for this IdealInt.

    Returns the hash code for this IdealInt.

    Definition Classes
    IdealInt → AnyRef → Any
  34. 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.

  35. def intValueSafe: Int

    Permalink
  36. 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

  37. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  38. def isMinusOne: Boolean

    Permalink

    Returns true iff this IdealInt is -one

    Returns true iff this IdealInt is -one

  39. def isOne: Boolean

    Permalink

    Returns true iff this IdealInt is one

    Returns true iff this IdealInt is one

  40. def isProbablePrime(certainty: Int): Boolean

    Permalink

    Function corresponding to BigInteger.isProbablePrime

    Function corresponding to BigInteger.isProbablePrime

  41. def isUnit: Boolean

    Permalink

    Returns true iff this IdealInt is one or -one

    Returns true iff this IdealInt is one or -one

  42. def isZero: Boolean

    Permalink

    Returns true iff this IdealInt is zero

    Returns true iff this IdealInt is zero

  43. def lcm(that: IdealInt): IdealInt

    Permalink

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

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

  45. def max(that: IdealInt): IdealInt

    Permalink

    Returns the maximum of this and that

  46. def min(that: IdealInt): IdealInt

    Permalink

    Returns the minimum of this and that

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

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

    Permalink
    Definition Classes
    AnyRef
  49. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  50. 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).

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  55. 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
  56. 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

  57. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(arg0: Long, arg1: Int): Unit

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

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

    Permalink

    Bit-wise or.

Inherited from AnyRef

Inherited from Any

Ungrouped