Heap

object Heap extends HeapInstances
Companion
class
class Object
trait Matchable
class Any

Type members

Classlikes

object Empty

The empty heap

The empty heap

final case
class Ranked[A](rank: Int, value: A)

Types

type ForestZipper[A] = (Forest[A], Forest[A])

Value members

Concrete methods

def apply[A](sz: Int, leq: (A, A) => Boolean, t: Tree[Ranked[A]]): Heap[A]
def fromCodata[F[_] : Foldable, A : Order](as: F[A]): Heap[A]
def fromData[F[_] : Foldable, A : Order](as: F[A]): Heap[A]
def fromDataWith[F[_] : Foldable, A](f: (A, A) => Boolean, as: F[A]): Heap[A]
def replicate[A : Order](a: A, i: Int): Heap[A]

Create a heap consisting of multiple copies of the same value. O(log n)

Create a heap consisting of multiple copies of the same value. O(log n)

def singleton[A : Order](a: A): Heap[A]

A heap with one element.

A heap with one element.

def sort[F[_] : Foldable, A : Order](xs: F[A]): IList[A]

Heap sort

Heap sort

def sortWith[F[_] : Foldable, A](f: (A, A) => Boolean, xs: F[A]): IList[A]

Heap sort

Heap sort

def unapply[A](h: Heap[A]): Option[(Int, (A, A) => Boolean, Tree[Ranked[A]])]

Implicits

Inherited implicits

implicit
def healEqual[A : Equal](implicit evidence$15: Equal[A], H: Foldable[Heap]): Equal[Heap[A]]
Inherited from
HeapInstances
implicit
Inherited from
HeapInstances
implicit
def heapMonoid[A]: Monoid[Heap[A]]
Inherited from
HeapInstances