skewbinomial

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

README

Skew Binomial Priority Queue

Implementation Notes

Nodes contain the following:

  • A key k, where k ∈ ℝ
  • A pointer to a value
  • A rank r, where r ∈ ℕ₀
  • An array of pointers to children

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forest

type Forest[K cmp.Ordered, V any] struct {
	// contains filtered or unexported fields
}

func NewForest

func NewForest[K cmp.Ordered, V any]() *Forest[K, V]

func (*Forest[K, V]) FindMin

func (f *Forest[K, V]) FindMin() (*Tree[K, V], int)

func (*Forest[K, V]) Insert

func (f *Forest[K, V]) Insert(newKey K, newValue V)

func (*Forest[K, V]) Merge

func (f *Forest[K, V]) Merge(other *Forest[K, V])

func (*Forest[K, V]) Remove

func (f *Forest[K, V]) Remove(tree *Tree[K, V], i int)

func (*Forest[K, V]) RemoveMin

func (f *Forest[K, V]) RemoveMin()

type Tree

type Tree[K cmp.Ordered, V any] struct {
	// contains filtered or unexported fields
}

func Merge

func Merge[K cmp.Ordered, V any](a, b []*Tree[K, V]) []*Tree[K, V]

func (*Tree[K, V]) Key

func (t *Tree[K, V]) Key() K

func (*Tree[K, V]) Value

func (t *Tree[K, V]) Value() V

Jump to

Keyboard shortcuts

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