Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockingQueue ¶
type BlockingQueue[T comparable] struct { *LinkedQueue[T] }
func NewBlockingQueue ¶
func NewBlockingQueue[T comparable]() *BlockingQueue[T]
func (*BlockingQueue[T]) Remove ¶
func (bq *BlockingQueue[T]) Remove() (T, error)
func (*BlockingQueue[T]) RemoveWithTimeout ¶
func (bq *BlockingQueue[T]) RemoveWithTimeout(duration time.Duration) (T, error)
type Deque ¶
type Deque[T comparable] struct { *LinkedQueue[T] }
func NewDeque ¶
func NewDeque[T comparable]() *Deque[T]
func (*Deque[T]) RemoveLast ¶
type LinkedQueue ¶
type LinkedQueue[T comparable] struct { // contains filtered or unexported fields }
func NewLinkedQueue ¶
func NewLinkedQueue[T comparable]() *LinkedQueue[T]
func (*LinkedQueue[T]) Add ¶
func (lq *LinkedQueue[T]) Add(e T)
func (*LinkedQueue[T]) Clear ¶
func (lq *LinkedQueue[T]) Clear()
func (*LinkedQueue[T]) Empty ¶
func (lq *LinkedQueue[T]) Empty() bool
func (*LinkedQueue[T]) Peek ¶
func (lq *LinkedQueue[T]) Peek() (T, error)
func (*LinkedQueue[T]) Remove ¶
func (lq *LinkedQueue[T]) Remove() (T, error)
func (*LinkedQueue[T]) Size ¶
func (lq *LinkedQueue[T]) Size() int64
type PriorityQueue ¶
type PriorityQueue[T any] struct { // contains filtered or unexported fields }
func NewPriorityQueue ¶
func NewPriorityQueue[T any](isMax bool, c comparator.Comparator[T]) *PriorityQueue[T]
func (*PriorityQueue[T]) Add ¶
func (pq *PriorityQueue[T]) Add(e T)
func (*PriorityQueue[T]) Clear ¶
func (pq *PriorityQueue[T]) Clear()
func (*PriorityQueue[T]) Empty ¶
func (pq *PriorityQueue[T]) Empty() bool
func (*PriorityQueue[T]) Peek ¶
func (pq *PriorityQueue[T]) Peek() (T, error)
TODO: IMPLEMENT PEEK IN HEAP AND CHANGE IT HERE
func (*PriorityQueue[T]) Remove ¶
func (pq *PriorityQueue[T]) Remove() (T, error)
func (*PriorityQueue[T]) Size ¶
func (pq *PriorityQueue[T]) Size() int64
Click to show internal directories.
Click to hide internal directories.