Documentation ¶
Index ¶
- Variables
- type Node
- type PQ
- func (p *PQ[K, T]) Cap() int
- func (p *PQ[K, T]) CurrentLength() int
- func (p *PQ[K, T]) DecInPosition(k int) *PqItem[K, T]
- func (p *PQ[K, T]) Delete(item *PqItem[K, T])
- func (p *PQ[K, T]) Dequeue() (*PqItem[K, T], bool)
- func (p *PQ[K, T]) Enqueue(orderBy K, value T) (*PqItem[K, T], error)
- func (p *PQ[K, T]) EnqueueWithOust(orderBy K, value T) (*PqItem[K, T], *PqItem[K, T])
- func (p *PQ[K, T]) IncInPosition(k int) *PqItem[K, T]
- type PqItem
- type Queue
- type Stack
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPqIsFull = errors.New("PQ is full")
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node[T any] struct { // contains filtered or unexported fields }
Node - double link list node
type PQ ¶ added in v1.1.0
type PQ[K constraints.Integer, T any] struct { // contains filtered or unexported fields }
func (*PQ[K, T]) CurrentLength ¶ added in v1.1.0
func (*PQ[K, T]) DecInPosition ¶ added in v1.1.0
func (*PQ[K, T]) EnqueueWithOust ¶ added in v1.1.0
func (*PQ[K, T]) IncInPosition ¶ added in v1.1.0
type PqItem ¶ added in v1.1.0
type PqItem[K constraints.Integer, T any] struct { // contains filtered or unexported fields }
func (*PqItem[K, T]) GetOrderBy ¶ added in v1.1.0
func (p *PqItem[K, T]) GetOrderBy() K
type Queue ¶
type Queue[T any] struct { // contains filtered or unexported fields }
Queue - FIFO queue
func (*Queue[T]) MoveToBack ¶ added in v1.0.1
Click to show internal directories.
Click to hide internal directories.