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 any x of type T. - anti-symmetric: if lteq(x, y) == true and lteq(y, x) == true then equiv(x, y) == true, for any x and y of type T. - transitive: if lteq(x, y) == true and lteq(y, z) == true then lteq(x, z) == true, for any x, y, and z of type T.
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
- Source
- PartialOrdering.scala
- Graph
-
- Supertypes
- Known subtypes
-
trait Ordering[T]object DeadlineIsOrdered.typeobject DurationIsOrdered.typeobject FiniteDurationIsOrdered.typeobject ValueOrdering.typetrait Numeric[T]trait Fractional[T]trait BigDecimalIsFractionalobject BigDecimalIsFractional.typetrait DoubleIsFractionalobject DoubleIsFractional.typetrait FloatIsFractionalobject FloatIsFractional.typetrait Integral[T]trait BigDecimalAsIfIntegralobject BigDecimalAsIfIntegral.typetrait BigIntIsIntegralobject BigIntIsIntegral.typetrait ByteIsIntegralobject ByteIsIntegral.typetrait CharIsIntegralobject CharIsIntegral.typetrait IntIsIntegralobject IntIsIntegral.typetrait LongIsIntegralobject LongIsIntegral.typetrait ShortIsIntegralobject ShortIsIntegral.typetrait BigDecimalIsConflictedtrait BigDecimalOrderingobject BigDecimal.typetrait BigIntOrderingobject BigInt.typetrait BooleanOrderingobject Boolean.typetrait ByteOrderingobject Byte.typetrait CachedReverse[T]object Int.typetrait CharOrderingobject Char.typetrait IeeeOrderingobject IeeeOrdering.typetrait TotalOrderingobject DeprecatedDoubleOrdering.typeobject TotalOrdering.typetrait IeeeOrderingobject IeeeOrdering.typetrait TotalOrderingobject DeprecatedFloatOrdering.typeobject TotalOrdering.typetrait IntOrderingtrait LongOrderingobject Long.typetrait OptionOrdering[T]trait ShortOrderingobject Short.typetrait StringOrderingobject String.typetrait SymbolOrderingobject Symbol.typetrait UnitOrderingobject Unit.type
- Self type