queue

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PriorityQueue

type PriorityQueue[T any] interface {
	Enqueue(element T, priority int) (ok bool)
	Dequeue() (element T, ok bool)
	Peek() (element T, ok bool)
	Empty() bool
	Full() bool
	Size() int
}

func NewPriorityQueue

func NewPriorityQueue[T any](capacity int) (q PriorityQueue[T], err error)

type Queue

type Queue[T any] interface {
	Enqueue(element T) (ok bool)
	Dequeue() (element T, ok bool)
	Peek() (element T, ok bool)
	Empty() bool
	Full() bool
}

func NewLoopQueue

func NewLoopQueue[T any](capacity int) (q Queue[T], err error)

func NewQueue

func NewQueue[T any](capacity int) Queue[T]

Jump to

Keyboard shortcuts

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