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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Permalink

    Returns the hash code for this IdealRat.

    Returns the hash code for this IdealRat.

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

    Permalink
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. def isMinusOne: Boolean

    Permalink

    Returns true iff this IdealRat is -one

    Returns true iff this IdealRat is -one

  27. def isOne: Boolean

    Permalink

    Returns true iff this IdealRat is one

    Returns true iff this IdealRat is one

  28. def isUnit: Boolean

    Permalink

    Returns true iff this IdealRat is one or -one

    Returns true iff this IdealRat is one or -one

  29. def isZero: Boolean

    Permalink

    Returns true iff this IdealRat is zero

    Returns true iff this IdealRat is zero

  30. def longValue: Long

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

    Permalink

    Returns the maximum of this and that

  32. def min(that: IdealRat): IdealRat

    Permalink

    Returns the minimum of this and that

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

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

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

    Permalink
    Definition Classes
    AnyRef
  36. val num: IdealInt

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

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

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

    Permalink

    Returns the String representation of this IdealRat.

    Returns the String representation of this IdealRat.

    Definition Classes
    IdealRat → AnyRef → Any
  40. 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

  41. final def wait(): Unit

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

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

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

Inherited from Ordered[IdealRat]

Inherited from Comparable[IdealRat]

Inherited from AnyRef

Inherited from Any

Ungrouped