Class/Object

ap.basetypes

IdealRat

Related Docs: object IdealRat | package basetypes

Permalink

final class IdealRat extends Ordered[IdealRat]

Naive implementation of rational numbers

Linear Supertypes
Ordered[IdealRat], Comparable[IdealRat], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IdealRat
  2. Ordered
  3. Comparable
  4. AnyRef
  5. 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: IdealRat): IdealRat

    Permalink

    Multiplication of IdealRat

    Multiplication of IdealRat

  4. def +(that: IdealRat): IdealRat

    Permalink

    Addition of IdealRat

    Addition of IdealRat

  5. def -(that: IdealRat): IdealRat

    Permalink

    Subtraction of IdealRat

    Subtraction of IdealRat

  6. def /(that: IdealRat): IdealRat

    Permalink

    Division of IdealRat.

    Division of IdealRat. 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

  7. def <(that: IdealRat): Boolean

    Permalink
    Definition Classes
    Ordered
  8. def <=(that: IdealRat): Boolean

    Permalink
    Definition Classes
    Ordered
  9. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def >(that: IdealRat): Boolean

    Permalink
    Definition Classes
    Ordered
  11. def >=(that: IdealRat): Boolean

    Permalink
    Definition Classes
    Ordered
  12. def abs: IdealRat

    Permalink

    Returns the absolute value of this IdealRat

    Returns the absolute value of this IdealRat

  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def clone(): AnyRef

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

    Permalink

    Compares this IdealRat with the specified IdealRat

    Compares this IdealRat with the specified IdealRat

    Definition Classes
    IdealRat → Ordered
  16. def compareTo(that: IdealRat): Int

    Permalink
    Definition Classes
    Ordered → Comparable
  17. val denom: IdealInt

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

    Permalink
    Definition Classes
    AnyRef
  19. def equals(that: IdealRat): Boolean

    Permalink

    Compares this IdealRat with the specified IdealRat for equality.

    Compares this IdealRat with the specified IdealRat for equality.

  20. def equals(that: Any): Boolean

    Permalink

    Compares this IdealRat with the specified value for equality.

    Compares this IdealRat with the specified value for equality.

    Definition Classes
    IdealRat → AnyRef → Any
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  22. def hashCode(): Int

    Permalink

    Returns the hash code for this IdealRat.

    Returns the hash code for this IdealRat.

    Definition Classes
    IdealRat → AnyRef → Any
  23. def intValue: Int

    Permalink
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def isMinusOne: Boolean

    Permalink

    Returns true iff this IdealRat is -one

    Returns true iff this IdealRat is -one

  26. def isOne: Boolean

    Permalink

    Returns true iff this IdealRat is one

    Returns true iff this IdealRat is one

  27. def isUnit: Boolean

    Permalink

    Returns true iff this IdealRat is one or -one

    Returns true iff this IdealRat is one or -one

  28. def isZero: Boolean

    Permalink

    Returns true iff this IdealRat is zero

    Returns true iff this IdealRat is zero

  29. def longValue: Long

    Permalink
  30. def max(that: IdealRat): IdealRat

    Permalink

    Returns the maximum of this and that

  31. def min(that: IdealRat): IdealRat

    Permalink

    Returns the minimum of this and that

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  35. val num: IdealInt

    Permalink
  36. def signum: Int

    Permalink

    Returns the sign of this IdealRat, i.e.

    Returns the sign of this IdealRat, i.e. -1 if it is less than 0, +1 if it is greater than 0 0 if it is equal to 0

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

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

    Permalink

    Returns the String representation of this IdealRat.

    Returns the String representation of this IdealRat.

    Definition Classes
    IdealRat → AnyRef → Any
  39. def unary_-: IdealRat

    Permalink

    Returns a IdealRat whose value is the negation of this IdealRat

    Returns a IdealRat whose value is the negation of this IdealRat

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

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 Ordered[IdealRat]

Inherited from Comparable[IdealRat]

Inherited from AnyRef

Inherited from Any

Ungrouped