Class/Object

xerial.core.collection

RedBlackTree

Related Docs: object RedBlackTree | package collection

Permalink

abstract class RedBlackTree[A, B] extends Logger

Base class for implementing data structures based on Red-Black trees.

Balancing operations (balanceLeft, balanceRight) are based on Okasaki's idea (See also Purely functional data structures by C. Okasaki)

TODO: deletion (Kahrs 2001) union (for range operation) (building RedBlackTrees from sorted list in linear time. Appel 2011)

A

key type

B

value type associated to the key

Linear Supertypes
Logger, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RedBlackTree
  2. Logger
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RedBlackTree()

    Permalink

Type Members

  1. case class BlackTree(key: A, value: B, left: Tree[A, B], right: Tree[A, B]) extends NonEmpty with Product with Serializable

    Permalink
  2. abstract class NonEmpty extends Tree[A, B]

    Permalink
  3. case class RedTree(key: A, value: B, left: Tree[A, B], right: Tree[A, B]) extends NonEmpty with Product with Serializable

    Permalink

Abstract Value Members

  1. abstract def isSmaller(a: A, b: A): Boolean

    Permalink

    Compare keys

    Compare keys

    Attributes
    protected
  2. abstract def updateTree(t: Tree[A, B], key: A, value: B): Tree[A, B]

    Permalink

    Update a tree with a given key and value.

    Update a tree with a given key and value. This method is used for adding a new value to node t without changing the tree structure.

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Empty extends Tree[A, B]

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def blacken(t: Tree[A, B]): Tree[A, B]

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def debug(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logger
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def error(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logger
  12. def fatal(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logger
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getLogger(tag: String): LogWriter

    Permalink

    Create a sub logger with a given tag name

    Create a sub logger with a given tag name

    Attributes
    protected
    Definition Classes
    Logger
  16. def getLogger(tag: Symbol): LogWriter

    Permalink

    Create a sub logger with a given tag name

    Create a sub logger with a given tag name

    Attributes
    protected
    Definition Classes
    Logger
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. def info(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logger
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def log[U](tag: String)(f: (LogWriter) ⇒ U): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logger
  21. def log(logLevel: LogLevel, message: ⇒ Any): Unit

    Permalink
    Definition Classes
    Logger
  22. def mkTree(isBlack: Boolean, key: A, h: B, l: Tree[A, B], r: Tree[A, B]): Tree[A, B]

    Permalink
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def newKey(key: A, lkey: Option[A], rkey: Option[A]): A

    Permalink

    Create a new key from the current key and its left/right children.

    Create a new key from the current key and its left/right children. This method returns the curent key in default

    key

    current key

    Attributes
    protected
  25. def newValue(key: A, value: B): B

    Permalink
    Attributes
    protected
  26. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. def trace(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logger
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def warn(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logger

Inherited from Logger

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped