scala.math.PartialOrdering
See thePartialOrdering companion object
trait PartialOrdering[T] extends Equiv[T], Pure
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.
Type parameters
- T
-
the type of elements being ordered
Attributes
- Companion
- object
- Source
- PartialOrdering.scala
- Graph
-
- Supertypes
- Known subtypes
-
object DeadlineIsOrderedobject DurationIsOrderedobject FiniteDurationIsOrderedtrait BigDecimalIsFractionalobject BigDecimalIsFractionaltrait DoubleIsFractionalobject DoubleIsFractionaltrait FloatIsFractionalobject FloatIsFractionaltrait BigDecimalAsIfIntegralobject BigDecimalAsIfIntegraltrait BigIntIsIntegralobject BigIntIsIntegraltrait ByteIsIntegralobject ByteIsIntegraltrait CharIsIntegralobject CharIsIntegraltrait IntIsIntegralobject IntIsIntegraltrait LongIsIntegralobject LongIsIntegraltrait ShortIsIntegralobject ShortIsIntegraltrait BigDecimalIsConflictedtrait BigDecimalOrderingobject BigDecimaltrait BigIntOrderingobject BigInttrait BooleanOrderingobject Booleantrait ByteOrderingobject Byteobject Inttrait CharOrderingobject Chartrait IeeeOrderingobject IeeeOrderingtrait TotalOrderingobject DeprecatedDoubleOrderingobject TotalOrderingtrait IeeeOrderingobject IeeeOrderingtrait TotalOrderingobject DeprecatedFloatOrderingobject TotalOrderingtrait IntOrderingtrait LongOrderingobject Longtrait ShortOrderingobject Shorttrait StringOrderingobject Stringtrait SymbolOrderingobject Symboltrait UnitOrderingobject Unit
- Self type
Members list
In this article