scalaz

Heap

trait Heap [A] extends AnyRef

Attributes
sealed
Source
Heap.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Heap
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Abstract Value Members

  1. def fold [B] (empty: ⇒ B, nonempty: (Int, (A, A) ⇒ Boolean, Tree[Ranked[A]]) ⇒ B): B

    Attributes
    abstract

Concrete Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def adjustMin (f: (A) ⇒ A): Heap[A]

  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def break (p: (A) ⇒ Boolean): (Heap[A], Heap[A])

    Returns a tuple where the first element is a heap consisting of the longest prefix of least elements in this heap that do not satisfy the given predicate, and the second element is the remainder of the elements.

    Returns a tuple where the first element is a heap consisting of the longest prefix of least elements in this heap that do not satisfy the given predicate, and the second element is the remainder of the elements. O(n log n)

  9. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. def deleteMin : Heap[A]

    Delete the minimum key from the heap and return the resulting heap.

    Delete the minimum key from the heap and return the resulting heap. O(log n)

  11. def drop (n: Int): Heap[A]

    Return a heap consisting of all the members of this heap except for the least n.

    Return a heap consisting of all the members of this heap except for the least n. O(n log n)

  12. def dropWhile (p: (A) ⇒ Boolean): Heap[A]

    Returns a heap consisting of the longest prefix of least elements of this heap that do not satisfy the predicate.

    Returns a heap consisting of the longest prefix of least elements of this heap that do not satisfy the predicate. O(n log n)

  13. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  14. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def filter (p: (A) ⇒ Boolean): Heap[A]

    Filter the heap, retaining only values that satisfy the predicate.

    Filter the heap, retaining only values that satisfy the predicate. O(n)

  16. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  17. def flatMap [B] (f: (A) ⇒ Heap[B])(implicit arg0: Order[B]): Heap[B]

    Construct heaps from each element in this heap and union them together into a new heap.

    Construct heaps from each element in this heap and union them together into a new heap. O(n)

  18. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  19. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  20. def insert (x: A)(implicit o: Order[A]): Heap[A]

    Insert a new value into the heap.

    Insert a new value into the heap. O(1)

  21. def isEmpty : Boolean

    Is the heap empty? O(1)

  22. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  23. def map [B] (f: (A) ⇒ B)(implicit arg0: Order[B]): Heap[B]

    Map a function over the heap, returning a new heap ordered appropriately.

    Map a function over the heap, returning a new heap ordered appropriately. O(n)

  24. def minimum : A

    Get the minimum key on the (nonempty) heap.

    Get the minimum key on the (nonempty) heap. O(1)

  25. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  26. def notify (): Unit

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

    Attributes
    final
    Definition Classes
    AnyRef
  28. def nub : Heap[A]

    Remove duplicate entries from the heap.

    Remove duplicate entries from the heap. O(n log n)

  29. def partition (p: (A) ⇒ Boolean): (Heap[A], Heap[A])

    Partition the heap according to a predicate.

    Partition the heap according to a predicate. The first heap contains all elements that satisfy the predicate. The second contains all elements that fail the predicate. O(n)

  30. def size : Int

    The number of elements in the heap.

    The number of elements in the heap. O(1)

  31. def span (p: (A) ⇒ Boolean): (Heap[A], Heap[A])

    Returns a tuple where the first element is a heap consisting of the longest prefix of least elements in this heap that satisfy the given predicate and the second element is the remainder of the elements.

    Returns a tuple where the first element is a heap consisting of the longest prefix of least elements in this heap that satisfy the given predicate and the second element is the remainder of the elements. O(n log n)

  32. def split (a: A): (Heap[A], Heap[A], Heap[A])

    Partition the heap of the elements that are less than, equal to, and greater than a given value.

    Partition the heap of the elements that are less than, equal to, and greater than a given value. O(n)

  33. def splitAt (n: Int): (Heap[A], Heap[A])

    Split into two heaps, the first containing the n least elements, the second containing the n greatest elements.

    Split into two heaps, the first containing the n least elements, the second containing the n greatest elements. O(n log n)

  34. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  35. def take (n: Int): Heap[A]

    Return a heap consisting of the least n elements of this heap.

    Return a heap consisting of the least n elements of this heap. O(n log n)

  36. def takeWhile (p: (A) ⇒ Boolean): Heap[A]

    Returns a heap consisting of the longest prefix of least elements of this heap that satisfy the predicate.

    Returns a heap consisting of the longest prefix of least elements of this heap that satisfy the predicate. O(n log n)

  37. def toList : List[A]

  38. def toStream : Stream[A]

  39. def toString (): String

    Definition Classes
    AnyRef → Any
  40. def toUnsortedList : List[A]

  41. def toUnsortedStream : Stream[A]

  42. def traverse [F[_], B] (f: (A) ⇒ F[B])(implicit arg0: Applicative[F], arg1: Order[B]): F[Heap[B]]

    Traverse the elements of the heap in sorted order and produce a new heap with applicative effects.

    Traverse the elements of the heap in sorted order and produce a new heap with applicative effects. O(n log n)

  43. def uncons : Option[(A, Heap[A])]

    Split the heap into the minimum element and the remainder.

    Split the heap into the minimum element and the remainder. O(log n)

  44. def union (as: Heap[A]): Heap[A]

    Meld the values from two heaps into one heap.

    Meld the values from two heaps into one heap. O(1)

  45. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any