Documentation ¶
Index ¶
Constants ¶
View Source
const MinQueueBufferCapacity = 16
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayQueue ¶
type ArrayQueue struct {
// contains filtered or unexported fields
}
func (*ArrayQueue) Dequeue ¶
func (q *ArrayQueue) Dequeue() interface{}
func (*ArrayQueue) Enqueue ¶
func (q *ArrayQueue) Enqueue(v interface{}) bool
func (*ArrayQueue) Front ¶
func (q *ArrayQueue) Front() interface{}
func (*ArrayQueue) Len ¶
func (q *ArrayQueue) Len() int
func (ArrayQueue) String ¶
func (q ArrayQueue) String() string
type CircularBufferQueue ¶
type CircularBufferQueue struct {
// contains filtered or unexported fields
}
A circular buffer implementation from .net core https://referencesource.microsoft.com/#mscorlib/system/collections/queue.cs
func (*CircularBufferQueue) Dequeue ¶
func (q *CircularBufferQueue) Dequeue() interface{}
func (*CircularBufferQueue) Enqueue ¶
func (q *CircularBufferQueue) Enqueue(v interface{}) bool
func (*CircularBufferQueue) Front ¶
func (q *CircularBufferQueue) Front() interface{}
func (*CircularBufferQueue) Len ¶
func (q *CircularBufferQueue) Len() int
func (CircularBufferQueue) String ¶
func (q CircularBufferQueue) String() string
type Deque ¶
type Deque interface { Len() int Front() interface{} Back() interface{} PushBack(interface{}) PushFront(interface{}) PopFront() interface{} PopBack() interface{} }
Deque is a double-ended queue
type LinkedArrayNode ¶
type LinkedArrayNode struct {
// contains filtered or unexported fields
}
func NewLinkedArrayNode ¶
func NewLinkedArrayNode() *LinkedArrayNode
type LinkedArrayQueue ¶
type LinkedArrayQueue struct {
// contains filtered or unexported fields
}
func (*LinkedArrayQueue) Dequeue ¶
func (q *LinkedArrayQueue) Dequeue() interface{}
func (*LinkedArrayQueue) Enqueue ¶
func (q *LinkedArrayQueue) Enqueue(v interface{}) bool
func (*LinkedArrayQueue) Front ¶
func (q *LinkedArrayQueue) Front() interface{}
func (*LinkedArrayQueue) Len ¶
func (q *LinkedArrayQueue) Len() int
func (LinkedArrayQueue) String ¶
func (q LinkedArrayQueue) String() string
type Queue ¶
type Queue interface { Len() int Front() interface{} Enqueue(interface{}) bool Dequeue() interface{} }
Queue is a FIFO queue
func NewArrayQueue ¶
func NewCircularBufferQueue ¶
func NewLinkedArrayQueue ¶
func NewListQueue ¶
func NewListQueue() Queue
Click to show internal directories.
Click to hide internal directories.