priorityqueue

package
v0.0.0-...-eefc36d Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Based on https://golang.org/pkg/container/heap/

Index

Constants

View Source
const PRI_INVALID int64 = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

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

An Item is something we manage in a priority queue.

type PriorityQueue

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

A PriorityQueue implements heap.Interface and holds Items.

func NewPriorityQueue

func NewPriorityQueue() *PriorityQueue

func (*PriorityQueue) Peak

func (pq *PriorityQueue) Peak() interface{}

func (*PriorityQueue) PeakPriority

func (pq *PriorityQueue) PeakPriority() int64

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() interface{}

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(value interface{}, priority int64)

Jump to

Keyboard shortcuts

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