object
RedBlackTree
Type Members
-
case class
BlackTree(key: BigInt, value: BigInt, left: Tree, right: Tree) extends Tree with Product with Serializable
-
case class
RedTree(key: BigInt, value: BigInt, left: Tree, right: Tree) extends Tree with Product with Serializable
-
sealed abstract
class
Tree extends AnyRef
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
object
Leaf extends Tree with Product with Serializable
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
contains(tree: Tree, x: BigInt): Boolean
-
def
delete(tree: Tree, k: BigInt): Tree
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
def
find(tree: Tree, x: BigInt): Option[BigInt]
-
def
findMax(tree: Tree): BigInt
-
def
findMin(tree: Tree): BigInt
-
def
findNth(tree: Tree, n: BigInt): Option[BigInt]
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
size(tree: Tree): BigInt
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
update(tree: Tree, k: BigInt, v: BigInt, overwrite: Boolean): Tree
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
This is a simplified version of the Red-Black Tree implementation used for TreeMaps and TreeSets in the Scala standard library, based on Stefan Kahrs' Haskell version of Okasaki's Red-Black Trees
References:
RBTree in the official Scala library