Trait/Object

algebra.number

IsReal

Related Docs: object IsReal | package number

Permalink

trait IsReal[A] extends Order[A] with Signed[A]

A simple type class for numeric types that are a subset of the reals.

Linear Supertypes
Signed[A], Order[A], PartialOrder[A], Eq[A], Serializable, Serializable, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. IsReal
  2. Signed
  3. Order
  4. PartialOrder
  5. Eq
  6. Serializable
  7. Serializable
  8. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def abs(a: A): A

    Permalink

    An idempotent function that ensures an object has a non-negative sign.

    An idempotent function that ensures an object has a non-negative sign.

    Definition Classes
    Signed
  2. abstract def ceil(a: A): A

    Permalink
  3. abstract def compare(x: A, y: A): Int

    Permalink

    Result of comparing x with y.

    Result of comparing x with y. Returns an Int whose sign is: - negative iff x < y - zero iff x = y - positive iff x > y

    Definition Classes
    Order
  4. abstract def floor(a: A): A

    Permalink
  5. abstract def getClass(): Class[_]

    Permalink
    Definition Classes
    Any
  6. abstract def isWhole(a: A): Boolean

    Permalink
  7. abstract def round(a: A): A

    Permalink
  8. abstract def signum(a: A): Int

    Permalink

    Return a's sign encoded as an Int (n) where: - n = 0 if a is 0 - n > 0 if a is positive - n < 0 is a is negative.

    Return a's sign encoded as an Int (n) where: - n = 0 if a is 0 - n > 0 if a is positive - n < 0 is a is negative.

    Definition Classes
    Signed
  9. abstract def toDouble(a: A): Double

    Permalink

Concrete Value Members

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

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

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

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  6. def eqv(x: A, y: A): Boolean

    Permalink

    Returns true if x = y, false otherwise.

    Returns true if x = y, false otherwise.

    Definition Classes
    OrderPartialOrderEq
  7. def gt(x: A, y: A): Boolean

    Permalink

    Returns true if x > y, false otherwise.

    Returns true if x > y, false otherwise.

    Definition Classes
    OrderPartialOrder
  8. def gteqv(x: A, y: A): Boolean

    Permalink

    Returns true if x >= y, false otherwise.

    Returns true if x >= y, false otherwise.

    Definition Classes
    OrderPartialOrder
  9. def hashCode(): Int

    Permalink
    Definition Classes
    Any
  10. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  11. def isSignNegative(a: A): Boolean

    Permalink
    Definition Classes
    Signed
  12. def isSignNonNegative(a: A): Boolean

    Permalink
    Definition Classes
    Signed
  13. def isSignNonPositive(a: A): Boolean

    Permalink
    Definition Classes
    Signed
  14. def isSignNonZero(a: A): Boolean

    Permalink
    Definition Classes
    Signed
  15. def isSignPositive(a: A): Boolean

    Permalink
    Definition Classes
    Signed
  16. def isSignZero(a: A): Boolean

    Permalink
    Definition Classes
    Signed
  17. def lt(x: A, y: A): Boolean

    Permalink

    Returns true if x < y, false otherwise.

    Returns true if x < y, false otherwise.

    Definition Classes
    OrderPartialOrder
  18. def lteqv(x: A, y: A): Boolean

    Permalink

    Returns true if x <= y, false otherwise.

    Returns true if x <= y, false otherwise.

    Definition Classes
    OrderPartialOrder
  19. def max(x: A, y: A): A

    Permalink

    If x >= y, return x, else return y.

    If x >= y, return x, else return y.

    Definition Classes
    Order
  20. def min(x: A, y: A): A

    Permalink

    If x <= y, return x, else return y.

    If x <= y, return x, else return y.

    Definition Classes
    Order
  21. def neqv(x: A, y: A): Boolean

    Permalink

    Returns true if x != y, false otherwise.

    Returns true if x != y, false otherwise.

    Definition Classes
    OrderEq
  22. def on[B](f: (B) ⇒ A): Order[B]

    Permalink

    Defines an order on B by mapping B to A using f and using As order to order B.

    Defines an order on B by mapping B to A using f and using As order to order B.

    Definition Classes
    OrderPartialOrderEq
  23. def partialCompare(x: A, y: A): Double

    Permalink

    Result of comparing x with y.

    Result of comparing x with y. Returns NaN if operands are not comparable. If operands are comparable, returns a Double whose sign is: - negative iff x < y - zero iff x = y - positive iff x > y

    Definition Classes
    OrderPartialOrder
  24. def pmax(x: A, y: A): Option[A]

    Permalink

    Returns Some(x) if x >= y, Some(y) if x < y, otherwise None.

    Returns Some(x) if x >= y, Some(y) if x < y, otherwise None.

    Definition Classes
    PartialOrder
  25. def pmin(x: A, y: A): Option[A]

    Permalink

    Returns Some(x) if x <= y, Some(y) if x > y, otherwise None.

    Returns Some(x) if x <= y, Some(y) if x > y, otherwise None.

    Definition Classes
    PartialOrder
  26. def reverse: Order[A]

    Permalink

    Defines an ordering on A where all arrows switch direction.

    Defines an ordering on A where all arrows switch direction.

    Definition Classes
    OrderPartialOrder
  27. def sign(a: A): Sign

    Permalink

    Return a's sign: - Zero if a is 0, - Positive if a is positive - Negative is a is negative.

    Return a's sign: - Zero if a is 0, - Positive if a is positive - Negative is a is negative.

    Definition Classes
    Signed
  28. def toString(): String

    Permalink
    Definition Classes
    Any
  29. def tryCompare(x: A, y: A): Option[Int]

    Permalink

    Result of comparing x with y.

    Result of comparing x with y. Returns None if operands are not comparable. If operands are comparable, returns Some[Int] where the Int sign is: - negative iff x < y - zero iff x = y - positive iff x > y

    Definition Classes
    PartialOrder

Inherited from Signed[A]

Inherited from Order[A]

Inherited from PartialOrder[A]

Inherited from Eq[A]

Inherited from Serializable

Inherited from Serializable

Inherited from Any

Ungrouped