diff options
-rw-r--r-- | sources/scala/collection/immutable/Tree.scala | 9 | ||||
-rw-r--r-- | sources/scala/util/automata/SubsetConstruction.scala | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/sources/scala/collection/immutable/Tree.scala b/sources/scala/collection/immutable/Tree.scala index aeb21a29f9..fdb3f8cf46 100644 --- a/sources/scala/collection/immutable/Tree.scala +++ b/sources/scala/collection/immutable/Tree.scala @@ -1,6 +1,6 @@ /* __ *\ ** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2005, LAMP/EPFL ** +** / __/ __// _ | / / / _ | (c) 2003-2004, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | ** ** /____/\___/_/ |_/____/_/ | | ** ** |/ ** @@ -38,8 +38,6 @@ package scala.collection.immutable; -import java.lang.Math; - /** General Balanced Trees - highly efficient functional dictionaries. * * An efficient implementation of Prof. Arne Andersson's General @@ -212,7 +210,7 @@ private case class INode[A <% Ordered[A],B](t1: GBTree[A,B], balance_p(GBNode(key, value, smaller, t1),smaller); protected def balance_p(t:GBTree[A,B],subtree:GBTree[A,B]):InsertTree[A,B] = { val Pair(subHeight, subSize) = subtree.count; - val totalHeight = 2 * Math.max(height, subHeight); + val totalHeight = 2 * scala.runtime.compat.Math.max(height, subHeight); val totalSize = size + subSize + 1; val BalanceHeight = totalSize * totalSize; if(totalHeight > BalanceHeight) ITree(t.balance(totalSize)); @@ -280,7 +278,7 @@ private case class GBNode[A <% Ordered[A],B](key: A, if (mySize == 1) Pair(1, mySize) else - Pair(2 * Math.max(sHeight, bHeight), mySize); + Pair(2 * scala.runtime.compat.Math.max(sHeight, bHeight), mySize); } def isDefinedAt(sKey:A):Boolean = { @@ -374,4 +372,3 @@ private case class GBNode[A <% Ordered[A],B](key: A, override def hashCode() = value.hashCode() + smaller.hashCode() + bigger.hashCode(); } - diff --git a/sources/scala/util/automata/SubsetConstruction.scala b/sources/scala/util/automata/SubsetConstruction.scala index c00c73a422..ddf122dbe3 100644 --- a/sources/scala/util/automata/SubsetConstruction.scala +++ b/sources/scala/util/automata/SubsetConstruction.scala @@ -27,7 +27,7 @@ class SubsetConstruction[T <: AnyRef](val nfa: NondetWordAutom[T]) { def selectTag(Q:BitSet, finals:Array[Int]) = { val it = Q.toSet(true).elements; - var mintag = java.lang.Integer.MAX_VALUE; + var mintag = scala.runtime.compat.Math.MAX_INT; while(it.hasNext) { val tag = finals(it.next); if((0 < tag) && (tag < mintag)) |