diff options
author | Malte Isberner <malte.isberner@gmail.com> | 2014-07-21 22:10:09 -0700 |
---|---|---|
committer | Malte Isberner <malte.isberner@gmail.com> | 2014-07-21 22:10:09 -0700 |
commit | 528df5becee03175e7462b64d7c22460cc5992f7 (patch) | |
tree | 8f0677b1472abe8cd76bd1861abeb64987ce5cf9 | |
parent | fd9a7e3816fa60c1643349cfdfe889401bc3a111 (diff) | |
download | scala-528df5becee03175e7462b64d7c22460cc5992f7.tar.gz scala-528df5becee03175e7462b64d7c22460cc5992f7.tar.bz2 scala-528df5becee03175e7462b64d7c22460cc5992f7.zip |
Fixed mathematically wrong statement in the documentation of scala.math.PartialOrdering.
- Previous (misleading) documentation suggested that a partial ordering *is* an equivalence relation. This has now been clarified.
- Existing documentation on properties of partial orderings (reflexive, transitive, antisymmetric) had several formatting inconsistencies that have now been remove.
-rw-r--r-- | src/library/scala/math/PartialOrdering.scala | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/library/scala/math/PartialOrdering.scala b/src/library/scala/math/PartialOrdering.scala index 9e35381528..8d7fc32535 100644 --- a/src/library/scala/math/PartialOrdering.scala +++ b/src/library/scala/math/PartialOrdering.scala @@ -15,17 +15,24 @@ package math * latter. * * A [[http://en.wikipedia.org/wiki/Partial_order partial ordering]] is a - * binary relation on a type `T` that is also an equivalence relation on - * values of type `T`. This relation is exposed as the `lteq` method of - * the `PartialOrdering` trait. This relation must be: + * 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: `lteq(x, y) == '''true'''` and `lteq(y, x) == true` - * then `equiv(x, y)`, for any `x` and `y` 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 + * [[http://en.wikipedia.org/wiki/Equivalence_relation 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 + * [[scala.math.Equiv Equiv]] trait. + * * @author Geoffrey Washburn * @version 1.0, 2008-04-0-3 * @since 2.7 |