scala.math.PartialOrdering
See thePartialOrdering companion object
trait PartialOrdering[T] extends Equiv[T]
A trait for representing partial orderings. It is important to distinguish between a type that has a partial order and a representation of partial ordering on some type. This trait is for representing the latter.
A partial ordering is a binary relation on a type T, exposed as the lteq method of this trait. This relation must be:
- reflexive:
lteq(x, x) == '''true''', for anyxof typeT. - anti-symmetric: if
lteq(x, y) == '''true'''andlteq(y, x) == '''true'''thenequiv(x, y) == '''true''', for anyxandyof typeT. - transitive: if
lteq(x, y) == '''true'''andlteq(y, z) == '''true'''thenlteq(x, z) == '''true''', for anyx,y, andzof typeT.
Additionally, a partial ordering induces an equivalence relation on a type T: x and y of type T are equivalent if and only if lteq(x, y) && lteq(y, x) == '''true'''. This equivalence relation is exposed as the equiv method, inherited from the Equiv trait.
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
trait Ordering[T]object DeadlineIsOrderedobject DurationIsOrderedobject FiniteDurationIsOrderedtrait Numeric[T]trait Fractional[T]trait BigDecimalIsFractionalobject BigDecimalIsFractionaltrait DoubleIsFractionalobject DoubleIsFractionaltrait FloatIsFractionalobject FloatIsFractionaltrait Integral[T]trait BigDecimalAsIfIntegralobject BigDecimalAsIfIntegraltrait BigIntIsIntegralobject BigIntIsIntegraltrait ByteIsIntegralobject ByteIsIntegraltrait CharIsIntegralobject CharIsIntegraltrait IntIsIntegralobject IntIsIntegraltrait LongIsIntegralobject LongIsIntegraltrait ShortIsIntegralobject ShortIsIntegraltrait BigDecimalIsConflictedtrait BigDecimalOrderingobject BigDecimaltrait BigIntOrderingobject BigInttrait BooleanOrderingobject Booleantrait ByteOrderingobject Bytetrait CachedReverse[T]object Inttrait CharOrderingobject Chartrait IeeeOrderingobject IeeeOrderingtrait TotalOrderingobject DeprecatedDoubleOrderingobject TotalOrderingtrait IeeeOrderingobject IeeeOrderingtrait TotalOrderingobject DeprecatedFloatOrderingobject TotalOrderingtrait IntOrderingtrait LongOrderingobject Longtrait OptionOrdering[T]trait ShortOrderingobject Shorttrait StringOrderingobject Stringtrait SymbolOrderingobject Symboltrait UnitOrderingobject Unit
- Self type
Members list
In this article