fibonacci

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: 1 Imported by: 2

Documentation

Overview

Package fibonacci implements a Fibonacci FibonacciHeap Data structure Reference: https://en.wikipedia.org/wiki/Fibonacci_heap Implementation from Introduction to Algorithms by T. Cormen

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FibonacciHeap

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

FibonacciHeap is a implementation of Fibonacci heap.

func New

func New() *FibonacciHeap

New creates and returns a new, empty heap.

func (*FibonacciHeap) Clear

func (fh *FibonacciHeap) Clear()

Clear resets heap.

func (*FibonacciHeap) DeleteMin

func (fh *FibonacciHeap) DeleteMin() heap.Item

DeleteMin extracts the node with minimum item from a heap and returns the minimum item.

func (*FibonacciHeap) FindMin

func (fh *FibonacciHeap) FindMin() heap.Item

FindMin returns the minimum item.

func (*FibonacciHeap) Insert

func (fh *FibonacciHeap) Insert(item heap.Item) heap.Item

Insert inserts a new node, with predeclared item, to the heap.

Jump to

Keyboard shortcuts

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