skew

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: 0

Documentation

Overview

Package skew implements a Skew heap Data structure

Structure is not thread safe.

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SkewHeap

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

SkewHeap is a skew heap implementation.

func New

func New() *SkewHeap

New returns an initialized SkewHeap.

func (*SkewHeap) Clear

func (h *SkewHeap) Clear()

Clear removes all items from the heap.

func (*SkewHeap) DeleteMin

func (h *SkewHeap) DeleteMin() heap.Item

DeleteMin deletes the minimum value and returns it.

func (*SkewHeap) FindMin

func (h *SkewHeap) FindMin() heap.Item

FindMin finds the minimum value.

func (*SkewHeap) Init

func (h *SkewHeap) Init() *SkewHeap

Init initializes or clears the SkewHeap

func (*SkewHeap) Insert

func (h *SkewHeap) Insert(v heap.Item) heap.Item

Insert adds an item into the heap.

Jump to

Keyboard shortcuts

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