heap

package
v0.0.0-...-db652b2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heap

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

func (*Heap) Append

func (obj *Heap) Append(value int)

func (*Heap) At

func (obj *Heap) At(pos int) int

func (*Heap) BuildHeap

func (a *Heap) BuildHeap()

func (*Heap) ExtractRoot

func (a *Heap) ExtractRoot() (max int, err error)

func (*Heap) GetArrayLength

func (obj *Heap) GetArrayLength() int

func (*Heap) GetSize

func (obj *Heap) GetSize() int

func (*Heap) Heapify

func (a *Heap) Heapify(i int)

func (*Heap) IncreaseKey

func (a *Heap) IncreaseKey(i int, key int) (err error)

func (*Heap) Left

func (obj *Heap) Left(i int) int

func (*Heap) MaxHeapInsert

func (a *Heap) MaxHeapInsert(key int)

func (*Heap) New

func (obj *Heap) New(isMax bool, array ...int)

func (*Heap) Parent

func (obj *Heap) Parent(i int) int

func (*Heap) Right

func (obj *Heap) Right(i int) int

func (*Heap) RootNode

func (a *Heap) RootNode() int

func (*Heap) Set

func (obj *Heap) Set(value int, pos int) (err error)

func (*Heap) SetSize

func (obj *Heap) SetSize(value int)

Jump to

Keyboard shortcuts

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