priorityqueue

package
v1.18.5 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	ID   uint64
	Dist float32
}

type ItemWithIndex

type ItemWithIndex struct {
	ID    uint64
	Index uint64
	Dist  float32
}

type Queue

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

func NewMax

func NewMax(capacity int) *Queue

func NewMin

func NewMin(capacity int) *Queue

func (*Queue) Cap

func (l *Queue) Cap() int

func (*Queue) Insert

func (l *Queue) Insert(id uint64, dist float32)

func (*Queue) Len

func (l *Queue) Len() int

func (*Queue) Pop

func (l *Queue) Pop() Item

func (*Queue) Reset

func (l *Queue) Reset()

func (*Queue) ResetCap

func (l *Queue) ResetCap(capacity int)

func (*Queue) Top

func (l *Queue) Top() Item

type QueueWithIndex

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

func NewMaxWithIndex

func NewMaxWithIndex(capacity int) *QueueWithIndex

func NewMinWithIndex

func NewMinWithIndex(capacity int) *QueueWithIndex

func (*QueueWithIndex) Cap

func (l *QueueWithIndex) Cap() int

func (*QueueWithIndex) Insert

func (l *QueueWithIndex) Insert(id uint64, index uint64, dist float32)

func (*QueueWithIndex) Len

func (l *QueueWithIndex) Len() int

func (*QueueWithIndex) Pop

func (l *QueueWithIndex) Pop() ItemWithIndex

func (*QueueWithIndex) Reset

func (l *QueueWithIndex) Reset()

func (*QueueWithIndex) ResetCap

func (l *QueueWithIndex) ResetCap(capacity int)

func (*QueueWithIndex) Top

func (l *QueueWithIndex) Top() ItemWithIndex

Jump to

Keyboard shortcuts

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