# SkewBinomialHeap

Namespace: FSharpx.Collections.Experimental

### Functions and values

 Function or value Description ``` count xs ``` Signature: xs:'T SkewBinomialHeap -> int Type parameters: 'T O(1) - Returns the number of elements in the collection. ``` empty descending ``` Signature: descending:bool -> '?12347 SkewBinomialHeap Type parameters: '?12347 O(1) - Returns an empty heap. ``` head xs ``` Signature: xs:'T SkewBinomialHeap -> 'T Type parameters: 'T O(log n) - Returns the element at the front. Throws if empty. ``` insert x xs ``` Signature: x:'T -> xs:'T SkewBinomialHeap -> 'T SkewBinomialHeap Type parameters: 'T O(1) - Returns a new heap with the element inserted. ``` isDescending xs ``` Signature: xs:'T SkewBinomialHeap -> bool Type parameters: 'T O(1) - Returns true if a call to head of tryHead would return the maximum element in the collection. Returns false if the element at the head is the minimum. ``` isEmpty xs ``` Signature: xs:'T SkewBinomialHeap -> bool Type parameters: 'T O(1) - Returns true if the heap has no elements. ``` length xs ``` Signature: xs:'T SkewBinomialHeap -> int Type parameters: 'T O(1) - Returns the number of elements in the collection. ``` merge xs ys ``` Signature: xs:'T SkewBinomialHeap -> ys:'T SkewBinomialHeap -> 'T SkewBinomialHeap Type parameters: 'T O(log n) - Returns a new heap with the elements of both heaps. The two heaps must have the same isDescending value. ``` ofSeq descending s ``` Signature: descending:bool -> s:seq<'?12367> -> '?12367 SkewBinomialHeap Type parameters: '?12367 O(n) - Returns heap from the sequence. ``` tail xs ``` Signature: xs:'T SkewBinomialHeap -> 'T SkewBinomialHeap Type parameters: 'T O(log n) - Returns a new heap with the front (head) element removed. Throws if empty. ``` toList xs ``` Signature: xs:'T SkewBinomialHeap -> 'T list Type parameters: 'T O(n * log n) - Returns and ordered list of the elements in the heap. ``` toSeq xs ``` Signature: xs:'T SkewBinomialHeap -> IEnumerable<'T> Type parameters: 'T O(n * log n) - Returns and ordered sequence of the elements in the heap. ``` tryHead xs ``` Signature: xs:'T SkewBinomialHeap -> 'T option Type parameters: 'T O(log n) - Returns Some x where x is the element at the front. Returns None if the collection is empty. ``` tryMerge xs ys ``` Signature: xs:'T SkewBinomialHeap -> ys:'T SkewBinomialHeap -> 'T SkewBinomialHeap option Type parameters: 'T O(log n) - Returns Some h where h is the merged heap, is both original heaps have the same isDescending value. Returns None if isDescending is diferent in the heaps supplied. ``` tryTail xs ``` Signature: xs:'T SkewBinomialHeap -> 'T SkewBinomialHeap option Type parameters: 'T O(log n) - Returns Some h where h is the heap with the front (head) element removed. Returns None if the collection is empty. ``` tryUncons xs ``` Signature: xs:'T SkewBinomialHeap -> ('T * 'T SkewBinomialHeap) option Type parameters: 'T O(log n) - Returns Some (h, t) where h is the head and t is the tail. Returns None if the collection is empty. ``` uncons xs ``` Signature: xs:'T SkewBinomialHeap -> 'T * 'T SkewBinomialHeap Type parameters: 'T O(log n) - Returns the head element and tail. Throws if empty.

### Active patterns

 Active pattern Description ``` ( |Cons|Nil| ) heap ``` Signature: heap:'T SkewBinomialHeap -> Choice<('T * 'T SkewBinomialHeap),unit> Type parameters: 'T CompiledName: `|Cons|Nil|`