Packages

case class Ratio(n: Long, d: Long = 1) extends Ordered[Ratio] with Product with Serializable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Ratio
  2. Serializable
  3. Product
  4. Equals
  5. Ordered
  6. Comparable
  7. AnyRef
  8. Any
Implicitly
  1. by orderingToOrdered
  2. by richDrxAny
  3. by any2stringadd
  4. by StringFormat
  5. by Ensuring
  6. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Ratio(n: Long, d: Long = 1)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def *(that: Ratio): Ratio
  4. def *(i: Long): Ratio
  5. def +(that: Ratio): Ratio
  6. def +(i: Long): Ratio
  7. def -(that: Ratio): Ratio

    subtraction a/b - c/d => a*d / b*d - c*b / b*d => (a*d - c*b) / b*d

  8. def -(i: Long): Ratio
  9. def ->[B](y: B): (Ratio, B)
    Implicit
    This member is added by an implicit conversion from Ratio toArrowAssoc[Ratio] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  10. def /(that: Ratio): Ratio
  11. def /(i: Long): Ratio
  12. def <(that: Ratio): Boolean
    Definition Classes
    Ordered
  13. def <=(that: Ratio): Boolean
    Definition Classes
    Ordered
  14. def ==(i: Long): Boolean
  15. def ==(that: Ratio): Boolean
  16. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def >(that: Ratio): Boolean
    Definition Classes
    Ordered
  18. def >=(that: Ratio): Boolean
    Definition Classes
    Ordered
  19. def abs: Ratio
  20. def applyIf(t: Boolean, f: (Ratio) => Ratio): Ratio
    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  21. def applyIf(t: (Ratio) => Boolean)(f: (Ratio) => Ratio): Ratio

    better chaining for types

    better chaining for types

    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  22. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  23. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  24. def compare(that: Ratio): Int
    Definition Classes
    Ratio → Ordered
  25. def compareTo(that: Ratio): Int
    Definition Classes
    Ordered → Comparable
  26. val d: Long
  27. def dB: Double
  28. def den: Long
  29. def diff(that: Ratio): Ratio
  30. def elementOf(xs: Set[Ratio]): Boolean
    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  31. def ensuring(cond: (Ratio) => Boolean, msg: => Any): Ratio
    Implicit
    This member is added by an implicit conversion from Ratio toEnsuring[Ratio] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  32. def ensuring(cond: (Ratio) => Boolean): Ratio
    Implicit
    This member is added by an implicit conversion from Ratio toEnsuring[Ratio] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  33. def ensuring(cond: Boolean, msg: => Any): Ratio
    Implicit
    This member is added by an implicit conversion from Ratio toEnsuring[Ratio] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  34. def ensuring(cond: Boolean): Ratio
    Implicit
    This member is added by an implicit conversion from Ratio toEnsuring[Ratio] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  35. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. def equals(other: Any): Boolean
    Definition Classes
    Ratio → Equals → AnyRef → Any
  37. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  38. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Ratio toStringFormat[Ratio] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  39. lazy val gcd: Long
  40. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  41. def hashCode(): Int
    Definition Classes
    Ratio → AnyRef → Any
  42. def inv: Ratio
  43. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  44. def log: Double
  45. def log(b: Double): Double
  46. def log10: Double
  47. def logE: Double
  48. val n: Long
  49. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  50. def neg: Ratio
  51. def noneIf(f: (Ratio) => Boolean): Option[Ratio]
    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  52. def not: Ratio

    1-n/d => (d - n)/d

  53. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  54. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  55. def num: Long
  56. def optionIf(f: (Ratio) => Boolean): Option[Ratio]

    optionally wrap an object

    optionally wrap an object

    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  57. def percentString: String
  58. def preApply[B](f: (Ratio) => B): B

    a preApply f => f(a)

    a preApply f => f(a)

    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  59. def productElementNames: Iterator[String]
    Definition Classes
    Product
  60. def reduce: Ratio
  61. def sideEffect(f: (Ratio) => Unit): Ratio

    side effect filter

    side effect filter

    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  62. def someIf(f: (Ratio) => Boolean): Option[Ratio]
    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  63. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  64. val thisAny: Ratio
    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  65. def toDouble: Double
  66. def todB: Double
  67. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  68. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  69. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Shadowed Implicit Value Members

  1. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Ratio toany2stringadd[Ratio] performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (ratio: any2stringadd[Ratio]).+(other)
    Definition Classes
    any2stringadd
  2. def <(that: Ratio): Boolean
    Implicit
    This member is added by an implicit conversion from Ratio toOrdered[Ratio] performed by method orderingToOrdered in scala.math.Ordered.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (ratio: Ordered[Ratio]).<(that)
    Definition Classes
    Ordered
  3. def <=(that: Ratio): Boolean
    Implicit
    This member is added by an implicit conversion from Ratio toOrdered[Ratio] performed by method orderingToOrdered in scala.math.Ordered.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (ratio: Ordered[Ratio]).<=(that)
    Definition Classes
    Ordered
  4. def >(that: Ratio): Boolean
    Implicit
    This member is added by an implicit conversion from Ratio toOrdered[Ratio] performed by method orderingToOrdered in scala.math.Ordered.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (ratio: Ordered[Ratio]).>(that)
    Definition Classes
    Ordered
  5. def >=(that: Ratio): Boolean
    Implicit
    This member is added by an implicit conversion from Ratio toOrdered[Ratio] performed by method orderingToOrdered in scala.math.Ordered.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (ratio: Ordered[Ratio]).>=(that)
    Definition Classes
    Ordered
  6. def compare(that: Ratio): Int
    Implicit
    This member is added by an implicit conversion from Ratio toOrdered[Ratio] performed by method orderingToOrdered in scala.math.Ordered.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (ratio: Ordered[Ratio]).compare(that)
    Definition Classes
    Ordered
  7. def compareTo(that: Ratio): Int
    Implicit
    This member is added by an implicit conversion from Ratio toOrdered[Ratio] performed by method orderingToOrdered in scala.math.Ordered.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (ratio: Ordered[Ratio]).compareTo(that)
    Definition Classes
    Ordered → Comparable

Deprecated Value Members

  1. def ?>(f: (Ratio) => Boolean): Option[Ratio]

    alias for option if

    alias for option if

    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
    Annotations
    @deprecated
    Deprecated

    (Since version v0.2.15) to many symbols are hard to undertand

  2. def |>[B](f: (Ratio) => B): B
    Implicit
    This member is added by an implicit conversion from Ratio toDrxAny[Ratio] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
    Annotations
    @deprecated
    Deprecated

    (Since version v0.2.15) use preApply if you must (symbols are concise without concision)

  3. def [B](y: B): (Ratio, B)
    Implicit
    This member is added by an implicit conversion from Ratio toArrowAssoc[Ratio] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Ordered[Ratio]

Inherited from Comparable[Ratio]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion orderingToOrdered fromRatio to Ordered[Ratio]

Inherited by implicit conversion richDrxAny fromRatio to DrxAny[Ratio]

Inherited by implicit conversion any2stringadd fromRatio to any2stringadd[Ratio]

Inherited by implicit conversion StringFormat fromRatio to StringFormat[Ratio]

Inherited by implicit conversion Ensuring fromRatio to Ensuring[Ratio]

Inherited by implicit conversion ArrowAssoc fromRatio to ArrowAssoc[Ratio]

Ungrouped