Documentation ¶
Index ¶
- type PriorityQueue
- func (p *PriorityQueue[V]) Clear()
- func (p *PriorityQueue[V]) Contains(value V) bool
- func (p *PriorityQueue[V]) Dequeue() V
- func (p *PriorityQueue[V]) Enqueue(value V)
- func (p *PriorityQueue[V]) IsEmpty() bool
- func (p *PriorityQueue[V]) Peek() V
- func (p *PriorityQueue[V]) Size() int
- func (p *PriorityQueue[V]) Values() []V
- type Queue
- func (q *Queue[V]) Clear()
- func (q *Queue[V]) Contains(value V) bool
- func (q *Queue[V]) Dequeue() V
- func (q *Queue[V]) DescendingIterator() structs.Iterator[V]
- func (q *Queue[V]) Enqueue(value V)
- func (q *Queue[V]) IsEmpty() bool
- func (q *Queue[V]) Iterator() structs.Iterator[V]
- func (q *Queue[V]) Peek() V
- func (q *Queue[V]) Size() int
- func (q *Queue[V]) Values() []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PriorityQueue ¶
type PriorityQueue[V any] struct { // contains filtered or unexported fields }
func FromPriorityHeap ¶
func FromPriorityHeap[V any](h *heap.Heap[V]) *PriorityQueue[V]
func NewPriority ¶
func NewPriority[V any](cmp structs.CompareFunc[V]) *PriorityQueue[V]
func NewPriorityCap ¶
func NewPriorityCap[V any](capacity int, cmp structs.CompareFunc[V]) *PriorityQueue[V]
func (*PriorityQueue[V]) Clear ¶
func (p *PriorityQueue[V]) Clear()
func (*PriorityQueue[V]) Contains ¶
func (p *PriorityQueue[V]) Contains(value V) bool
func (*PriorityQueue[V]) Dequeue ¶
func (p *PriorityQueue[V]) Dequeue() V
func (*PriorityQueue[V]) Enqueue ¶
func (p *PriorityQueue[V]) Enqueue(value V)
func (*PriorityQueue[V]) IsEmpty ¶
func (p *PriorityQueue[V]) IsEmpty() bool
func (*PriorityQueue[V]) Peek ¶
func (p *PriorityQueue[V]) Peek() V
func (*PriorityQueue[V]) Size ¶
func (p *PriorityQueue[V]) Size() int
func (*PriorityQueue[V]) Values ¶
func (p *PriorityQueue[V]) Values() []V
type Queue ¶
type Queue[V any] struct { // contains filtered or unexported fields }
Queue is an implementation of a double-ended queue backed by *list.List
func NewOrdered ¶
func NewOrdered[V constraints.Ordered]() *Queue[V]
func (*Queue[V]) DescendingIterator ¶
Click to show internal directories.
Click to hide internal directories.