summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-04-03 14:35:49 +0000
committerGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-04-03 14:35:49 +0000
commit279da87f484b6ac77d87b3efe2d69d3a09492a43 (patch)
tree169563a6fca8f0911b78ee568d5e9f6a95517607 /src
parent4ec9c8abe1b2bb8aff74edaf954453070bef89fd (diff)
downloadscala-279da87f484b6ac77d87b3efe2d69d3a09492a43.tar.gz
scala-279da87f484b6ac77d87b3efe2d69d3a09492a43.tar.bz2
scala-279da87f484b6ac77d87b3efe2d69d3a09492a43.zip
Decided that it did not make sense to express p...
Decided that it did not make sense to express part of the properties of a PartialOrdering in terms of an equaivalence relation. Concluded that downward transitivity for Orderings followed from upward transitivity and the property on Orderings that does not yet have a name.
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/Ordering.scala14
-rw-r--r--src/library/scala/PartialOrdering.scala4
2 files changed, 6 insertions, 12 deletions
diff --git a/src/library/scala/Ordering.scala b/src/library/scala/Ordering.scala
index 358cfb5bdf..ef4bbfecd6 100644
--- a/src/library/scala/Ordering.scala
+++ b/src/library/scala/Ordering.scala
@@ -16,8 +16,8 @@ package scala
* latter.
*
* A <a href="http://en.wikipedia.org/wiki/Total_order">total ordering</a>
- * is a binary relation on a type <code>T</code> that is also a partial
- * ordering on values of type <code>T</code>. This relation is exposed as
+ * is a binary relation on a type <code>T</code> that is also an equivalence relation
+ * and partial ordering on values of type <code>T</code>. This relation is exposed as
* the <code>compare</code> method of the <code>Ordering</code> trait.
* This relation must be:
* <ul>
@@ -26,14 +26,8 @@ package scala
* <li>(need a name): <code>compare(x, y) == z</code> and <code>compare(y, x) == w</code>
* then <code>Math.signum(z) == -Math.signum(w)</code>, for any <code>x</code> and <code>y</code> of
* type <code>T</code> and <code>z</code> and <code>w</code> of type <code>Int</code>.</li>
- * <li>upward transitive: if <code>compare(x, y) == z</code> and <code>lteq(y, w) == v</code>
- * and <code>Math.signum(z) >= 0</code> and <code>Math.signum(v) >= 0</code> then
- * <code>compare(x, w) == u</code> and <code>Math.signum(z + v) == Math.signum(u)</code>,
- * for any <code>x</code>, <code>y</code>,
- * and <code>w</code> of type <code>T</code> and <code>z</code>, <code>v</code>, and <code>u</code>
- * of type <code>Int</code>.</li>
- * <li>downward transitive: if <code>compare(x, y) == z</code> and <code>lteq(y, w) == v</code>
- * and <code>Math.signum(z) <= 0</code> and <code>Math.signum(v) <= 0</code> then
+ * <li>transitive: if <code>compare(x, y) == z</code> and <code>lteq(y, w) == v</code>
+ * and <code>Math.signum(z) &gt;= 0</code> and <code>Math.signum(v) &gt;= 0</code> then
* <code>compare(x, w) == u</code> and <code>Math.signum(z + v) == Math.signum(u)</code>,
* for any <code>x</code>, <code>y</code>,
* and <code>w</code> of type <code>T</code> and <code>z</code>, <code>v</code>, and <code>u</code>
diff --git a/src/library/scala/PartialOrdering.scala b/src/library/scala/PartialOrdering.scala
index 0945121724..2bc755b772 100644
--- a/src/library/scala/PartialOrdering.scala
+++ b/src/library/scala/PartialOrdering.scala
@@ -20,8 +20,8 @@ package scala
* the <code>lteq</code> method of the <code>PartialOrdering</code> trait.
* This relation must be:
* <ul>
- * <li>an equivalence relation: if <code>equiv(x, y)</code> then <code>lteq(x, y)</code>,
- * for any <code>x</code> and <code>y</code> of type <code>T</code>.</li>
+ * <li>reflexive: <code>lteq(x, x) == true</code>, for any <code>x</code> of
+ * type <code>T</code>.</li>
* <li>anti-symmetric: <code>lteq(x, y) == true</code> and <code>lteq(y, x) == true</code>
* then <code>equiv(x, y)</code>, for any <code>x</code> and <code>y</code> of
* type <code>T</code>.</li>