abstract class LeftistHeap[T, HC <: HeapCollector[T, HC]] extends Iterable[T]
This class implements the leftist heap, see "Functional Data Structures" by Chris Okasaki
- Alphabetic
- By Inheritance
- LeftistHeap
- Iterable
- IterableFactoryDefaults
- IterableOps
- IterableOnceOps
- IterableOnce
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
-  new LeftistHeap()(implicit ord: Ordering[T])
Abstract Value Members
-   abstract  def collector: HCInterface for collecting information about the elements stored in the heap 
-   abstract  def deleteMin: LeftistHeap[T, HC]Remove the minimum element from this heap, or raise an exception iff this heap is empty ( isEmpty()==true)Remove the minimum element from this heap, or raise an exception iff this heap is empty ( isEmpty()==true)- returns
- a heap that contains all elements of this heap except for the minimum element 
 
-   abstract  def emptyHeap: LeftistHeap[T, HC]Construct an empty heap Construct an empty heap - Attributes
- protected
 
-   abstract  def findMin: T- returns
- the minimum element of this heap, or raise an exception iff this heap is empty ( - isEmpty()==true)
 
-   abstract  def flatItMapRec(f: (T) => Iterator[T], stop: (LeftistHeap[T, HC]) => Boolean): LeftistHeap[T, HC]Apply a function fto all elements in this heap.Apply a function fto all elements in this heap. The heap traversal is skipped for a subheap if the functionstopapplied to this subheap returnstrue. The functionfcan returnnullto signal that a data element has not changed.
-   abstract  def insert(element: T): LeftistHeap[T, HC]Add an element to this heap object Add an element to this heap object - element
- The element to be added 
- returns
- a heap that contains all elements of this heap, and additionally - element
 
-   abstract  def insertHeap(h: LeftistHeap[T, HC]): LeftistHeap[T, HC]Add multiple elements to this heap object. Add multiple elements to this heap object. We keep this method protected, because otherwise one could use it to insert heaps that are sorted differently - h
- a heap containing the elements to be added 
- returns
- a heap that contains all elements of this heap, and additionally all objects from - h
 - Attributes
- protected[basetypes]
 
-   abstract  def removeAll(element: T): LeftistHeap[T, HC]Remove all elements of this heap which are equaltoelement.Remove all elements of this heap which are equaltoelement.- returns
- heap that has all occurrences of - elementremoved
 
-   abstract  def rightHeight: IntLength of the right spine, i.e. Length of the right spine, i.e. the length of the path from the root to rightmost leaf 
Concrete Value Members
-   final  def !=(arg0: Any): Boolean- Definition Classes
- AnyRef → Any
 
-   final  def ##: Int- Definition Classes
- AnyRef → Any
 
-  def +(el: T): LeftistHeap[T, HC]
-  def ++(els: Iterable[T]): LeftistHeap[T, HC]
-  def ++(els: Iterator[T]): LeftistHeap[T, HC]
-   final  def ++[B >: T](suffix: IterableOnce[B]): Iterable[B]- Definition Classes
- IterableOps
- Annotations
- @inline()
 
-   final  def ==(arg0: Any): Boolean- Definition Classes
- AnyRef → Any
 
-   final  def addString(b: StringBuilder): b.type- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
 
-   final  def addString(b: StringBuilder, sep: String): b.type- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
 
-    def addString(b: StringBuilder, start: String, sep: String, end: String): b.type- Definition Classes
- IterableOnceOps
 
-   final  def asInstanceOf[T0]: T0- Definition Classes
- Any
 
-    def className: String- Attributes
- protected[this]
- Definition Classes
- Iterable
 
-    def clone(): AnyRef- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
 
-   final  def coll: LeftistHeap.this.type- Attributes
- protected
- Definition Classes
- Iterable → IterableOps
 
-    def collect[B](pf: PartialFunction[T, B]): Iterable[B]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def collectFirst[B](pf: PartialFunction[T, B]): Option[B]- Definition Classes
- IterableOnceOps
 
-    def concat[B >: T](suffix: IterableOnce[B]): Iterable[B]- Definition Classes
- IterableOps
 
-    def copyToArray[B >: T](xs: Array[B], start: Int, len: Int): Int- Definition Classes
- IterableOnceOps
 
-    def copyToArray[B >: T](xs: Array[B], start: Int): Int- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
 
-    def copyToArray[B >: T](xs: Array[B]): Int- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
 
-    def corresponds[B](that: IterableOnce[B])(p: (T, B) => Boolean): Boolean- Definition Classes
- IterableOnceOps
 
-    def count(p: (T) => Boolean): Int- Definition Classes
- IterableOnceOps
 
-    def drop(n: Int): Iterable[T]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def dropRight(n: Int): Iterable[T]- Definition Classes
- IterableOps
 
-    def dropWhile(p: (T) => Boolean): Iterable[T]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def empty: Iterable[T]- Definition Classes
- IterableFactoryDefaults → IterableOps
 
-   final  def eq(arg0: AnyRef): Boolean- Definition Classes
- AnyRef
 
-    def equals(arg0: AnyRef): Boolean- Definition Classes
- AnyRef → Any
 
-    def exists(p: (T) => Boolean): Boolean- Definition Classes
- IterableOnceOps
 
-    def filter(pred: (T) => Boolean): Iterable[T]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def filterNot(pred: (T) => Boolean): Iterable[T]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def find(p: (T) => Boolean): Option[T]- Definition Classes
- IterableOnceOps
 
-    def findMinOption: Option[T]- returns
- the minimum element of this heap, or - None> iff this heap is empty (- isEmpty()==true)
 
-    def flatItMap(f: (T) => Iterator[T], stop: (LeftistHeap[T, HC]) => Boolean): LeftistHeap[T, HC]Apply a function fto all elements in this heap.Apply a function fto all elements in this heap. The heap traversal is skipped for a subheap if the functionstopapplied to this subheap returnstrue. The functionfcan returnnullto signal that a data element has not changed.
-    def flatItMapIter(f: (T) => Iterator[T], stop: (LeftistHeap[T, HC]) => Boolean): LeftistHeap[T, HC]Apply a function fto all elements in this heap.Apply a function fto all elements in this heap. The heap traversal is skipped for a subheap if the functionstopapplied to this subheap returnstrue. The functionfcan returnnullto signal that a data element has not changed.
-    def flatMap[B](f: (T) => IterableOnce[B]): Iterable[B]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def flatten[B](implicit asIterable: (T) => IterableOnce[B]): Iterable[B]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def fold[A1 >: T](z: A1)(op: (A1, A1) => A1): A1- Definition Classes
- IterableOnceOps
 
-    def foldLeft[B](z: B)(op: (B, T) => B): B- Definition Classes
- IterableOnceOps
 
-    def foldRight[B](z: B)(op: (T, B) => B): B- Definition Classes
- IterableOnceOps
 
-    def forall(p: (T) => Boolean): Boolean- Definition Classes
- IterableOnceOps
 
-    def foreach[U](f: (T) => U): Unit- Definition Classes
- IterableOnceOps
 
-    def fromSpecific(coll: IterableOnce[T]): Iterable[T]- Attributes
- protected
- Definition Classes
- IterableFactoryDefaults → IterableOps
 
-   final  def getClass(): Class[_ <: AnyRef]- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
 
-    def groupBy[K](f: (T) => K): Map[K, Iterable[T]]- Definition Classes
- IterableOps
 
-    def groupMap[K, B](key: (T) => K)(f: (T) => B): Map[K, Iterable[B]]- Definition Classes
- IterableOps
 
-    def groupMapReduce[K, B](key: (T) => K)(f: (T) => B)(reduce: (B, B) => B): Map[K, B]- Definition Classes
- IterableOps
 
-    def grouped(size: Int): Iterator[Iterable[T]]- Definition Classes
- IterableOps
 
-    def hashCode(): Int- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
 
-    def head: T- Definition Classes
- IterableOps
 
-    def headOption: Option[T]- Definition Classes
- IterableOps
 
-    def init: Iterable[T]- Definition Classes
- IterableOps
 
-    def inits: Iterator[Iterable[T]]- Definition Classes
- IterableOps
 
-    def insertIt(elements: Iterator[T]): LeftistHeap[T, HC]Add multiple elements to this heap object Add multiple elements to this heap object - elements
- the elements to be added 
- returns
- a heap that contains all elements of this heap, and additionally all objects from - elements
 
-    def isEmpty: Boolean- Definition Classes
- IterableOnceOps
 
-   final  def isInstanceOf[T0]: Boolean- Definition Classes
- Any
 
-    def isTraversableAgain: Boolean- Definition Classes
- IterableOps → IterableOnceOps
 
-    def iterableFactory: IterableFactory[Iterable]- Definition Classes
- Iterable → IterableOps
 
-    def iterator: Iterator[T]- Definition Classes
- LeftistHeap → IterableOnce
 
-    def knownSize: Int- Definition Classes
- IterableOnce
 
-    def last: T- Definition Classes
- IterableOps
 
-    def lastOption: Option[T]- Definition Classes
- IterableOps
 
-    def lazyZip[B](that: Iterable[B]): LazyZip2[T, B, LeftistHeap.this.type]- Definition Classes
- Iterable
 
-    def map[B](f: (T) => B): Iterable[B]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def max[B >: T](implicit ord: Ordering[B]): T- Definition Classes
- IterableOnceOps
 
-    def maxBy[B](f: (T) => B)(implicit ord: Ordering[B]): T- Definition Classes
- IterableOnceOps
 
-    def maxByOption[B](f: (T) => B)(implicit ord: Ordering[B]): Option[T]- Definition Classes
- IterableOnceOps
 
-    def maxOption[B >: T](implicit ord: Ordering[B]): Option[T]- Definition Classes
- IterableOnceOps
 
-    def min[B >: T](implicit ord: Ordering[B]): T- Definition Classes
- IterableOnceOps
 
-    def minBy[B](f: (T) => B)(implicit ord: Ordering[B]): T- Definition Classes
- IterableOnceOps
 
-    def minByOption[B](f: (T) => B)(implicit ord: Ordering[B]): Option[T]- Definition Classes
- IterableOnceOps
 
-    def minOption[B >: T](implicit ord: Ordering[B]): Option[T]- Definition Classes
- IterableOnceOps
 
-   final  def mkString: String- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
 
-   final  def mkString(sep: String): String- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
 
-   final  def mkString(start: String, sep: String, end: String): String- Definition Classes
- IterableOnceOps
 
-   final  def ne(arg0: AnyRef): Boolean- Definition Classes
- AnyRef
 
-    def newSpecificBuilder: Builder[T, Iterable[T]]- Attributes
- protected
- Definition Classes
- IterableFactoryDefaults → IterableOps
 
-    def nonEmpty: Boolean- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
 
-   final  def notify(): Unit- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
 
-   final  def notifyAll(): Unit- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
 
-    def partition(p: (T) => Boolean): (Iterable[T], Iterable[T])- Definition Classes
- IterableOps
 
-    def partitionMap[A1, A2](f: (T) => Either[A1, A2]): (Iterable[A1], Iterable[A2])- Definition Classes
- IterableOps
 
-    def product[B >: T](implicit num: Numeric[B]): B- Definition Classes
- IterableOnceOps
 
-    def reduce[B >: T](op: (B, B) => B): B- Definition Classes
- IterableOnceOps
 
-    def reduceLeft[B >: T](op: (B, T) => B): B- Definition Classes
- IterableOnceOps
 
-    def reduceLeftOption[B >: T](op: (B, T) => B): Option[B]- Definition Classes
- IterableOnceOps
 
-    def reduceOption[B >: T](op: (B, B) => B): Option[B]- Definition Classes
- IterableOnceOps
 
-    def reduceRight[B >: T](op: (T, B) => B): B- Definition Classes
- IterableOnceOps
 
-    def reduceRightOption[B >: T](op: (T, B) => B): Option[B]- Definition Classes
- IterableOnceOps
 
-    def reversed: Iterable[T]- Attributes
- protected
- Definition Classes
- IterableOnceOps
 
-    def scan[B >: T](z: B)(op: (B, B) => B): Iterable[B]- Definition Classes
- IterableOps
 
-    def scanLeft[B](z: B)(op: (B, T) => B): Iterable[B]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def scanRight[B](z: B)(op: (T, B) => B): Iterable[B]- Definition Classes
- IterableOps
 
-    def size: Int- Definition Classes
- IterableOnceOps
 
-    def sizeCompare(that: Iterable[_]): Int- Definition Classes
- IterableOps
 
-    def sizeCompare(otherSize: Int): Int- Definition Classes
- IterableOps
 
-   final  def sizeIs: SizeCompareOps- Definition Classes
- IterableOps
- Annotations
- @inline()
 
-    def slice(from: Int, until: Int): Iterable[T]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def sliding(size: Int, step: Int): Iterator[Iterable[T]]- Definition Classes
- IterableOps
 
-    def sliding(size: Int): Iterator[Iterable[T]]- Definition Classes
- IterableOps
 
-    def sortedIterator: Iterator[T]- returns
- an iterator that returns all elements of this heap in increasing order 
 
-    def span(p: (T) => Boolean): (Iterable[T], Iterable[T])- Definition Classes
- IterableOps → IterableOnceOps
 
-    def splitAt(n: Int): (Iterable[T], Iterable[T])- Definition Classes
- IterableOps → IterableOnceOps
 
-    def stepper[S <: Stepper[_]](implicit shape: StepperShape[T, S]): S- Definition Classes
- IterableOnce
 
-    def stringPrefix: String- Attributes
- protected[this]
- Definition Classes
- Iterable
- Annotations
- @deprecatedOverriding()
 
-    def sum[B >: T](implicit num: Numeric[B]): B- Definition Classes
- IterableOnceOps
 
-   final  def synchronized[T0](arg0: => T0): T0- Definition Classes
- AnyRef
 
-    def tail: Iterable[T]- Definition Classes
- IterableOps
 
-    def tails: Iterator[Iterable[T]]- Definition Classes
- IterableOps
 
-    def take(n: Int): Iterable[T]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def takeRight(n: Int): Iterable[T]- Definition Classes
- IterableOps
 
-    def takeWhile(p: (T) => Boolean): Iterable[T]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def tapEach[U](f: (T) => U): Iterable[T]- Definition Classes
- IterableOps → IterableOnceOps
 
-    def to[C1](factory: Factory[T, C1]): C1- Definition Classes
- IterableOnceOps
 
-    def toArray[B >: T](implicit arg0: ClassTag[B]): Array[B]- Definition Classes
- IterableOnceOps
 
-   final  def toBuffer[B >: T]: Buffer[B]- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
 
-    def toIndexedSeq: IndexedSeq[T]- Definition Classes
- IterableOnceOps
 
-    def toList: List[T]- Definition Classes
- IterableOnceOps
 
-    def toMap[K, V](implicit ev: <:<[T, (K, V)]): Map[K, V]- Definition Classes
- IterableOnceOps
 
-    def toSeq: Seq[T]- Definition Classes
- IterableOnceOps
 
-    def toSet[B >: T]: Set[B]- Definition Classes
- IterableOnceOps
 
-    def toString(): String- Definition Classes
- LeftistHeap → Iterable → AnyRef → Any
 
-    def toVector: Vector[T]- Definition Classes
- IterableOnceOps
 
-    def transpose[B](implicit asIterable: (T) => Iterable[B]): Iterable[Iterable[B]]- Definition Classes
- IterableOps
 
-    def unsortedIterator: Iterator[T]- returns
- an iterator that returns all elements of this heap 
 
-    def unzip[A1, A2](implicit asPair: (T) => (A1, A2)): (Iterable[A1], Iterable[A2])- Definition Classes
- IterableOps
 
-    def unzip3[A1, A2, A3](implicit asTriple: (T) => (A1, A2, A3)): (Iterable[A1], Iterable[A2], Iterable[A3])- Definition Classes
- IterableOps
 
-    def view: View[T]- Definition Classes
- IterableOps
 
-   final  def wait(arg0: Long, arg1: Int): Unit- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
 
-   final  def wait(arg0: Long): Unit- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
 
-   final  def wait(): Unit- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
 
-    def withFilter(p: (T) => Boolean): WithFilter[T, Iterable]- Definition Classes
- IterableOps
 
-    def zip[B](that: IterableOnce[B]): Iterable[(T, B)]- Definition Classes
- IterableOps
 
-    def zipAll[A1 >: T, B](that: Iterable[B], thisElem: A1, thatElem: B): Iterable[(A1, B)]- Definition Classes
- IterableOps
 
-    def zipWithIndex: Iterable[(T, Int)]- Definition Classes
- IterableOps → IterableOnceOps
 
Deprecated Value Members
-    def ++:[B >: T](that: IterableOnce[B]): Iterable[B]- Definition Classes
- IterableOps
- Annotations
- @deprecated
- Deprecated
- (Since version 2.13.0) Use ++ instead of ++: for collections of type Iterable 
 
-   final  def /:[B](z: B)(op: (B, T) => B): B- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
- (Since version 2.13.0) Use foldLeft instead of /: 
 
-   final  def :\[B](z: B)(op: (T, B) => B): B- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
- (Since version 2.13.0) Use foldRight instead of :\ 
 
-    def aggregate[B](z: => B)(seqop: (B, T) => B, combop: (B, B) => B): B- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated
- Deprecated
- (Since version 2.13.0) For sequential collections, prefer - foldLeft(z)(seqop). For parallel collections, use- ParIterableLike#aggregate.
 
-    def companion: IterableFactory[Iterable]- Definition Classes
- IterableOps
- Annotations
- @deprecated @deprecatedOverriding() @inline()
- Deprecated
- (Since version 2.13.0) Use iterableFactory instead 
 
-   final  def copyToBuffer[B >: T](dest: Buffer[B]): Unit- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
- (Since version 2.13.0) Use - dest ++= collinstead
 
-    def finalize(): Unit- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- (Since version 9) 
 
-    def hasDefiniteSize: Boolean- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated
- Deprecated
- (Since version 2.13.0) Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details) 
 
-   final  def repr: Iterable[T]- Definition Classes
- IterableOps
- Annotations
- @deprecated
- Deprecated
- (Since version 2.13.0) Use coll instead of repr in a collection implementation, use the collection value itself from the outside 
 
-    def seq: LeftistHeap.this.type- Definition Classes
- Iterable
- Annotations
- @deprecated
- Deprecated
- (Since version 2.13.0) Iterable.seq always returns the iterable itself 
 
-   final  def toIterable: LeftistHeap.this.type- Definition Classes
- Iterable → IterableOps
- Annotations
- @deprecated
- Deprecated
- (Since version 2.13.7) toIterable is internal and will be made protected; its name is similar to - toListor- toSeq, but it doesn't copy non-immutable collections
 
-   final  def toIterator: Iterator[T]- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
- (Since version 2.13.0) Use .iterator instead of .toIterator 
 
-   final  def toStream: Stream[T]- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
- (Since version 2.13.0) Use .to(LazyList) instead of .toStream 
 
-   final  def toTraversable: Traversable[T]- Definition Classes
- IterableOps
- Annotations
- @deprecated
- Deprecated
- (Since version 2.13.0) toTraversable is internal and will be made protected; its name is similar to - toListor- toSeq, but it doesn't copy non-immutable collections
 
-    def view(from: Int, until: Int): View[T]- Definition Classes
- IterableOps
- Annotations
- @deprecated
- Deprecated
- (Since version 2.13.0) Use .view.slice(from, until) instead of .view(from, until)