binomial

package
v0.0.0-...-88e3535 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package binomial implements a Binomial heap Data structure

Structure is not thread safe.

Reference: https://en.wikipedia.org/wiki/Binomial_heap

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinomialHeap

type BinomialHeap struct {
	// contains filtered or unexported fields
}

BinomialHeap is an implementation of a Binomial Heap.

func (*BinomialHeap) Clear

func (b *BinomialHeap) Clear()

Clear resets the current BinomialHeap

func (*BinomialHeap) Delete

func (p *BinomialHeap) Delete(item heap.Item)

Deletes passed item from the heap. The complexity is O(log n).

func (*BinomialHeap) DeleteMin

func (b *BinomialHeap) DeleteMin() heap.Item

DeleteMin removes the smallest item from the BinomialHeap and returns it The complexity is O(log n).

func (*BinomialHeap) FindMin

func (b *BinomialHeap) FindMin() heap.Item

FindMin returns the smallest item in the heap. The complexity is O(log n).

func (*BinomialHeap) Insert

func (b *BinomialHeap) Insert(v heap.Item) heap.Item

Insert inserts the value to the BinomialHeap and returns the item The complexity is O(log n).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL