Fractional

trait Fractional[T] extends Numeric[T]

Since

2.8

Linear Supertypes
Numeric[T], Ordering[T], PartialOrdering[T], Equiv[T], Serializable, java.io.Serializable, Comparator[T], AnyRef, Any
Ordering
1. Alphabetic
2. By inheritance
Inherited
1. Fractional
2. Numeric
3. Ordering
4. PartialOrdering
5. Equiv
6. Serializable
7. Serializable
8. Comparator
9. AnyRef
10. Any
Implicitly
2. by StringFormat
3. by Ensuring
4. by ArrowAssoc
1. Hide All
2. Show all
Visibility
1. Public
2. All

Type Members

2. class Ops extends AnyRef

Definition Classes
Numeric

Abstract Value Members

1. abstract def compare(x: T, y: T): Int

Returns an integer whose sign communicates how x compares to y.

Returns an integer whose sign communicates how x compares to y.

The result sign has the following meaning:

• negative if x < y
• positive if x > y
• zero otherwise (if x == y)
Definition Classes
Ordering → Comparator

3. abstract def fromInt(x: Int): T

Definition Classes
Numeric
4. abstract def minus(x: T, y: T): T

Definition Classes
Numeric
5. abstract def negate(x: T): T

Definition Classes
Numeric
6. abstract def plus(x: T, y: T): T

Definition Classes
Numeric
7. abstract def times(x: T, y: T): T

Definition Classes
Numeric
8. abstract def toDouble(x: T): Double

Definition Classes
Numeric
9. abstract def toFloat(x: T): Float

Definition Classes
Numeric
10. abstract def toInt(x: T): Int

Definition Classes
Numeric
11. abstract def toLong(x: T): Long

Definition Classes
Numeric

Concrete Value Members

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

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

Definition Classes
AnyRef → Any
3. def +(other: String): String

Implicit information
This member is added by an implicit conversion from Fractional[T] to any2stringadd[Fractional[T]] performed by method any2stringadd in scala.Predef.
Definition Classes
4. def ->[B](y: B): (Fractional[T], B)

Implicit information
This member is added by an implicit conversion from Fractional[T] to ArrowAssoc[Fractional[T]] performed by method ArrowAssoc in scala.Predef.
Definition Classes
ArrowAssoc
Annotations
()
5. final def ==(arg0: Any): Boolean

Definition Classes
AnyRef → Any
6. def abs(x: T): T

Definition Classes
Numeric
7. final def asInstanceOf[T0]: T0

Definition Classes
Any
8. def clone(): AnyRef

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
( ... )
9. def ensuring(cond: (Fractional[T]) ⇒ Boolean, msg: ⇒ Any): Fractional[T]

Implicit information
This member is added by an implicit conversion from Fractional[T] to Ensuring[Fractional[T]] performed by method Ensuring in scala.Predef.
Definition Classes
Ensuring
10. def ensuring(cond: (Fractional[T]) ⇒ Boolean): Fractional[T]

Implicit information
This member is added by an implicit conversion from Fractional[T] to Ensuring[Fractional[T]] performed by method Ensuring in scala.Predef.
Definition Classes
Ensuring
11. def ensuring(cond: Boolean, msg: ⇒ Any): Fractional[T]

Implicit information
This member is added by an implicit conversion from Fractional[T] to Ensuring[Fractional[T]] performed by method Ensuring in scala.Predef.
Definition Classes
Ensuring
12. def ensuring(cond: Boolean): Fractional[T]

Implicit information
This member is added by an implicit conversion from Fractional[T] to Ensuring[Fractional[T]] performed by method Ensuring in scala.Predef.
Definition Classes
Ensuring
13. final def eq(arg0: AnyRef): Boolean

Definition Classes
AnyRef
14. def equals(arg0: Any): Boolean

Definition Classes
AnyRef → Any
15. def equiv(x: T, y: T): Boolean

Return true if `x` == `y` in the ordering.

Return true if `x` == `y` in the ordering.

Definition Classes
OrderingPartialOrderingEquiv
16. def finalize(): Unit

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
( classOf[java.lang.Throwable] )
17. def formatted(fmtstr: String): String

Returns string formatted according to given `format` string.

Returns string formatted according to given `format` string. Format strings are as for `String.format` (@see java.lang.String.format).

Implicit information
This member is added by an implicit conversion from Fractional[T] to StringFormat[Fractional[T]] performed by method StringFormat in scala.Predef.
Definition Classes
StringFormat
Annotations
()
18. final def getClass(): Class[_]

Definition Classes
AnyRef → Any
19. def gt(x: T, y: T): Boolean

Return true if `x` > `y` in the ordering.

Return true if `x` > `y` in the ordering.

Definition Classes
OrderingPartialOrdering
20. def gteq(x: T, y: T): Boolean

Return true if `x` >= `y` in the ordering.

Return true if `x` >= `y` in the ordering.

Definition Classes
OrderingPartialOrdering
21. def hashCode(): Int

Definition Classes
AnyRef → Any
22. final def isInstanceOf[T0]: Boolean

Definition Classes
Any
23. def lt(x: T, y: T): Boolean

Return true if `x` < `y` in the ordering.

Return true if `x` < `y` in the ordering.

Definition Classes
OrderingPartialOrdering
24. def lteq(x: T, y: T): Boolean

Return true if `x` <= `y` in the ordering.

Return true if `x` <= `y` in the ordering.

Definition Classes
OrderingPartialOrdering
25. def max(x: T, y: T): T

Return `x` if `x` >= `y`, otherwise `y`.

Return `x` if `x` >= `y`, otherwise `y`.

Definition Classes
Ordering
26. def min(x: T, y: T): T

Return `x` if `x` <= `y`, otherwise `y`.

Return `x` if `x` <= `y`, otherwise `y`.

Definition Classes
Ordering
27. implicit def mkNumericOps(lhs: T): FractionalOps

Definition Classes
FractionalNumeric
28. implicit def mkOrderingOps(lhs: T): Fractional.Ops

This implicit method augments `T` with the comparison operators defined in `scala.math.Ordering.Ops`.

This implicit method augments `T` with the comparison operators defined in `scala.math.Ordering.Ops`.

Definition Classes
Ordering
29. final def ne(arg0: AnyRef): Boolean

Definition Classes
AnyRef
30. final def notify(): Unit

Definition Classes
AnyRef
31. final def notifyAll(): Unit

Definition Classes
AnyRef
32. def on[U](f: (U) ⇒ T): Ordering[U]

Given f, a function from U into T, creates an Ordering[U] whose compare function is equivalent to:

Given f, a function from U into T, creates an Ordering[U] whose compare function is equivalent to:

`def compare(x:U, y:U) = Ordering[T].compare(f(x), f(y))`
Definition Classes
Ordering
33. def one: T

Definition Classes
Numeric
34. def reverse: Ordering[T]

Return the opposite ordering of this one.

Return the opposite ordering of this one.

Definition Classes
OrderingPartialOrdering
35. def signum(x: T): Int

Definition Classes
Numeric
36. final def synchronized[T0](arg0: ⇒ T0): T0

Definition Classes
AnyRef
37. def toString(): String

Definition Classes
AnyRef → Any
38. def tryCompare(x: T, y: T): Some[Int]

Returns whether a comparison between `x` and `y` is defined, and if so the result of `compare(x, y)`.

Returns whether a comparison between `x` and `y` is defined, and if so the result of `compare(x, y)`.

Definition Classes
OrderingPartialOrdering
39. final def wait(): Unit

Definition Classes
AnyRef
Annotations
( ... )
40. final def wait(arg0: Long, arg1: Int): Unit

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

Definition Classes
AnyRef
Annotations
( ... )
42. def zero: T

Definition Classes
Numeric
43. def →[B](y: B): (Fractional[T], B)

Implicit information
This member is added by an implicit conversion from Fractional[T] to ArrowAssoc[Fractional[T]] performed by method ArrowAssoc in scala.Predef.
Definition Classes
ArrowAssoc