Trait/Object

dsptools.numbers

Order

Related Docs: object Order | package numbers

Permalink

trait Order[A <: Data] extends PartialOrder[A]

The Order type class is used to define a total ordering on some type A. An order is defined by a relation <=, which obeys the following laws:

- either x <= y or y <= x (totality) - if x <= y and y <= x, then x == y (antisymmetry) - if x <= y and y <= z, then x <= z (transitivity)

The truth table for compare is defined as follows:

x <= y x >= y Int true true = 0 (corresponds to x == y) true false < 0 (corresponds to x < y) false true > 0 (corresponds to x > y)

By the totality law, x <= y and y <= x cannot be both false.

Self Type
Order[A]
Linear Supertypes
PartialOrder[A], Eq[A], Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Order
  2. PartialOrder
  3. Eq
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def compare(x: A, y: A): ComparisonBundle

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

    Permalink
    Definition Classes
    Any

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): Bool

    Permalink

    Returns true if x and y are equivalent, false otherwise.

    Returns true if x and y are equivalent, false otherwise.

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

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

    Permalink
    Definition Classes
    OrderPartialOrder
  9. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  11. def lt(x: A, y: A): Bool

    Permalink
    Definition Classes
    OrderPartialOrder
  12. def lteqv(x: A, y: A): Bool

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

    Permalink
  14. def min(x: A, y: A): A

    Permalink
  15. def neqv(x: A, y: A): Bool

    Permalink

    Returns false if x and y are equivalent, true otherwise.

    Returns false if x and y are equivalent, true otherwise.

    Definition Classes
    Eq
  16. def on[B <: Data](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
  17. def partialCompare(x: A, y: A): ValidIO[ComparisonBundle]

    Permalink

    Result of comparing x with y.

    Result of comparing x with y. Returns ValidIO[ComparisonBundle] with valid false if operands are not comparable. If operands are comparable, bits.lt will be true if x < y and bits.eq will be true if x = y

    Definition Classes
    OrderPartialOrder
  18. def pmax(x: A, y: A): ValidIO[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
  19. def pmin(x: A, y: A): ValidIO[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
  20. 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
  21. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from PartialOrder[A]

Inherited from Eq[A]

Inherited from Any

Ungrouped