Documentation
¶
Index ¶
- type ArrayLimitedDeque
- func (ald *ArrayLimitedDeque[T]) Clear()
- func (ald *ArrayLimitedDeque[T]) Empty() bool
- func (ald *ArrayLimitedDeque[T]) Full() bool
- func (ald *ArrayLimitedDeque[T]) Head() *T
- func (ald *ArrayLimitedDeque[T]) Init(capa int) *ArrayLimitedDeque[T]
- func (ald *ArrayLimitedDeque[T]) PopBack() *T
- func (ald *ArrayLimitedDeque[T]) PopFront() *T
- func (ald *ArrayLimitedDeque[T]) PushBack(val T) bool
- func (ald *ArrayLimitedDeque[T]) PushFront(val T) bool
- func (ald *ArrayLimitedDeque[T]) Tail() *T
- type ArrayLimitedQueue
- func (alq *ArrayLimitedQueue[T]) Clear()
- func (alq *ArrayLimitedQueue[T]) Empty() bool
- func (alq *ArrayLimitedQueue[T]) Full() bool
- func (alq *ArrayLimitedQueue[T]) Init(capa int) *ArrayLimitedQueue[T]
- func (alq *ArrayLimitedQueue[T]) Pop() *T
- func (alq *ArrayLimitedQueue[T]) Push(val T) bool
- func (alq *ArrayLimitedQueue[T]) Top() *T
- type ArrayOrderedList
- func (aol *ArrayOrderedList[T]) Add(val T)
- func (aol *ArrayOrderedList[T]) Clear(keepCap bool)
- func (aol *ArrayOrderedList[T]) EqualRange(val T) (int, int)
- func (aol *ArrayOrderedList[T]) Exist(val T) (bool, int)
- func (aol *ArrayOrderedList[T]) Get(index int) T
- func (aol *ArrayOrderedList[T]) Init(arr []T, sorted bool, lessOp func(T, T) bool) *ArrayOrderedList[T]
- func (aol *ArrayOrderedList[T]) Len() int
- func (aol *ArrayOrderedList[T]) LowerBound(val T) int
- func (aol *ArrayOrderedList[T]) Remove(val T) int
- func (aol *ArrayOrderedList[T]) RemoveAt(index int)
- func (aol *ArrayOrderedList[T]) RemoveOne(val T)
- func (aol *ArrayOrderedList[T]) RemoveRange(indexBegin, indexEnd int) int
- func (aol *ArrayOrderedList[T]) UpperBound(val T) int
- func (aol *ArrayOrderedList[T]) Upsert(val T)
- type BinaryHeap
- func (bh *BinaryHeap[T]) Clear(keepCap bool)
- func (bh *BinaryHeap[T]) Get(i int) T
- func (bh *BinaryHeap[T]) Init(arr []T, sorted bool, lessOp func(T, T) bool) *BinaryHeap[T]
- func (bh *BinaryHeap[T]) Len() int
- func (bh *BinaryHeap[T]) Pop() (T, bool)
- func (bh *BinaryHeap[T]) Push(val T)
- func (bh *BinaryHeap[T]) RemoveAt(index int) T
- func (bh *BinaryHeap[T]) Set(index int, val T)
- func (bh *BinaryHeap[T]) SetTop(val T)
- func (bh *BinaryHeap[T]) Top() (T, bool)
- type LinkedList
- func (ll *LinkedList[T]) Clear()
- func (ll *LinkedList[T]) Head() *LinkedListNode[T]
- func (ll *LinkedList[T]) Init() *LinkedList[T]
- func (ll *LinkedList[T]) InsertAfter(node, mark *LinkedListNode[T])
- func (ll *LinkedList[T]) InsertBefore(node, mark *LinkedListNode[T])
- func (ll *LinkedList[T]) Len() int
- func (ll *LinkedList[T]) PopBack() *LinkedListNode[T]
- func (ll *LinkedList[T]) PopFront() *LinkedListNode[T]
- func (ll *LinkedList[T]) PushBack(node *LinkedListNode[T])
- func (ll *LinkedList[T]) PushFront(node *LinkedListNode[T])
- func (ll *LinkedList[T]) Tail() *LinkedListNode[T]
- func (ll *LinkedList[T]) Unlink(node *LinkedListNode[T])
- type LinkedListNode
- type RBTree
- func (t *RBTree[K, V]) Add(key K, value V) *RBTreeNode[K, V]
- func (t *RBTree[K, V]) AddUnique(key K, value V) (*RBTreeNode[K, V], bool)
- func (t *RBTree[K, V]) Clear()
- func (t *RBTree[K, V]) Count(key K) int
- func (t *RBTree[K, V]) EqualRange(key K) (*RBTreeNode[K, V], *RBTreeNode[K, V])
- func (t *RBTree[K, V]) Exist(key K) (bool, *RBTreeNode[K, V])
- func (t *RBTree[K, V]) ForEach(f func(*RBTreeNode[K, V]))
- func (t *RBTree[K, V]) Head() *RBTreeNode[K, V]
- func (t *RBTree[K, V]) Init(lessOp func(K, K) bool) *RBTree[K, V]
- func (t *RBTree[K, V]) Len() int
- func (t *RBTree[K, V]) LowerBound(key K) *RBTreeNode[K, V]
- func (t *RBTree[K, V]) Remove(key K) int
- func (t *RBTree[K, V]) RemoveAt(node *RBTreeNode[K, V])
- func (t *RBTree[K, V]) RemoveOne(key K)
- func (t *RBTree[K, V]) RemoveRange(nodeBegin, nodeEnd *RBTreeNode[K, V]) int
- func (t *RBTree[K, V]) Tail() *RBTreeNode[K, V]
- func (t *RBTree[K, V]) UpperBound(key K) *RBTreeNode[K, V]
- type RBTreeNode
- type SkipList
- func (sl *SkipList[K, V]) Add(key K, value V) (*SkipListNode[K, V], bool)
- func (sl *SkipList[K, V]) Clear()
- func (sl *SkipList[K, V]) Get(key K) *SkipListNode[K, V]
- func (sl *SkipList[K, V]) Init(lessOp func(K, K) bool) *SkipList[K, V]
- func (sl *SkipList[K, V]) Len() int
- func (sl *SkipList[K, V]) Remove(key K) *SkipListNode[K, V]
- type SkipListNode
- type TreeMap
- func (tm *TreeMap[K, V]) Add(key K, value V) bool
- func (tm *TreeMap[K, V]) Clear()
- func (tm *TreeMap[K, V]) ForEach(f func(K, *V))
- func (tm *TreeMap[K, V]) Get(key K) *V
- func (tm *TreeMap[K, V]) Init(lessOp func(K, K) bool) *TreeMap[K, V]
- func (tm *TreeMap[K, V]) Len() int
- func (tm *TreeMap[K, V]) Remove(key K)
- func (tm *TreeMap[K, V]) Set(key K, value V)
- type TreeSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayLimitedDeque ¶
type ArrayLimitedDeque[T any] struct { // contains filtered or unexported fields }
func (*ArrayLimitedDeque[T]) Clear ¶
func (ald *ArrayLimitedDeque[T]) Clear()
func (*ArrayLimitedDeque[T]) Empty ¶
func (ald *ArrayLimitedDeque[T]) Empty() bool
func (*ArrayLimitedDeque[T]) Full ¶
func (ald *ArrayLimitedDeque[T]) Full() bool
func (*ArrayLimitedDeque[T]) Head ¶
func (ald *ArrayLimitedDeque[T]) Head() *T
func (*ArrayLimitedDeque[T]) Init ¶
func (ald *ArrayLimitedDeque[T]) Init(capa int) *ArrayLimitedDeque[T]
func (*ArrayLimitedDeque[T]) PopBack ¶
func (ald *ArrayLimitedDeque[T]) PopBack() *T
func (*ArrayLimitedDeque[T]) PopFront ¶
func (ald *ArrayLimitedDeque[T]) PopFront() *T
func (*ArrayLimitedDeque[T]) PushBack ¶
func (ald *ArrayLimitedDeque[T]) PushBack(val T) bool
func (*ArrayLimitedDeque[T]) PushFront ¶
func (ald *ArrayLimitedDeque[T]) PushFront(val T) bool
func (*ArrayLimitedDeque[T]) Tail ¶
func (ald *ArrayLimitedDeque[T]) Tail() *T
type ArrayLimitedQueue ¶
type ArrayLimitedQueue[T any] struct { // contains filtered or unexported fields }
func (*ArrayLimitedQueue[T]) Clear ¶
func (alq *ArrayLimitedQueue[T]) Clear()
func (*ArrayLimitedQueue[T]) Empty ¶
func (alq *ArrayLimitedQueue[T]) Empty() bool
func (*ArrayLimitedQueue[T]) Full ¶
func (alq *ArrayLimitedQueue[T]) Full() bool
func (*ArrayLimitedQueue[T]) Init ¶
func (alq *ArrayLimitedQueue[T]) Init(capa int) *ArrayLimitedQueue[T]
func (*ArrayLimitedQueue[T]) Pop ¶
func (alq *ArrayLimitedQueue[T]) Pop() *T
func (*ArrayLimitedQueue[T]) Push ¶
func (alq *ArrayLimitedQueue[T]) Push(val T) bool
func (*ArrayLimitedQueue[T]) Top ¶
func (alq *ArrayLimitedQueue[T]) Top() *T
type ArrayOrderedList ¶
type ArrayOrderedList[T any] struct { // contains filtered or unexported fields }
func (*ArrayOrderedList[T]) Add ¶
func (aol *ArrayOrderedList[T]) Add(val T)
func (*ArrayOrderedList[T]) Clear ¶
func (aol *ArrayOrderedList[T]) Clear(keepCap bool)
func (*ArrayOrderedList[T]) EqualRange ¶
func (aol *ArrayOrderedList[T]) EqualRange(val T) (int, int)
func (*ArrayOrderedList[T]) Exist ¶
func (aol *ArrayOrderedList[T]) Exist(val T) (bool, int)
func (*ArrayOrderedList[T]) Get ¶
func (aol *ArrayOrderedList[T]) Get(index int) T
func (*ArrayOrderedList[T]) Init ¶
func (aol *ArrayOrderedList[T]) Init(arr []T, sorted bool, lessOp func(T, T) bool) *ArrayOrderedList[T]
func (*ArrayOrderedList[T]) Len ¶
func (aol *ArrayOrderedList[T]) Len() int
func (*ArrayOrderedList[T]) LowerBound ¶
func (aol *ArrayOrderedList[T]) LowerBound(val T) int
func (*ArrayOrderedList[T]) Remove ¶
func (aol *ArrayOrderedList[T]) Remove(val T) int
func (*ArrayOrderedList[T]) RemoveAt ¶
func (aol *ArrayOrderedList[T]) RemoveAt(index int)
func (*ArrayOrderedList[T]) RemoveOne ¶
func (aol *ArrayOrderedList[T]) RemoveOne(val T)
func (*ArrayOrderedList[T]) RemoveRange ¶
func (aol *ArrayOrderedList[T]) RemoveRange(indexBegin, indexEnd int) int
func (*ArrayOrderedList[T]) UpperBound ¶
func (aol *ArrayOrderedList[T]) UpperBound(val T) int
func (*ArrayOrderedList[T]) Upsert ¶
func (aol *ArrayOrderedList[T]) Upsert(val T)
type BinaryHeap ¶
type BinaryHeap[T any] struct { // contains filtered or unexported fields }
func (*BinaryHeap[T]) Clear ¶
func (bh *BinaryHeap[T]) Clear(keepCap bool)
func (*BinaryHeap[T]) Get ¶
func (bh *BinaryHeap[T]) Get(i int) T
func (*BinaryHeap[T]) Init ¶
func (bh *BinaryHeap[T]) Init(arr []T, sorted bool, lessOp func(T, T) bool) *BinaryHeap[T]
func (*BinaryHeap[T]) Len ¶
func (bh *BinaryHeap[T]) Len() int
func (*BinaryHeap[T]) Pop ¶
func (bh *BinaryHeap[T]) Pop() (T, bool)
func (*BinaryHeap[T]) Push ¶
func (bh *BinaryHeap[T]) Push(val T)
func (*BinaryHeap[T]) RemoveAt ¶
func (bh *BinaryHeap[T]) RemoveAt(index int) T
func (*BinaryHeap[T]) Set ¶
func (bh *BinaryHeap[T]) Set(index int, val T)
func (*BinaryHeap[T]) SetTop ¶
func (bh *BinaryHeap[T]) SetTop(val T)
func (*BinaryHeap[T]) Top ¶
func (bh *BinaryHeap[T]) Top() (T, bool)
type LinkedList ¶
type LinkedList[T any] struct { // contains filtered or unexported fields }
func (*LinkedList[T]) Clear ¶
func (ll *LinkedList[T]) Clear()
func (*LinkedList[T]) Head ¶
func (ll *LinkedList[T]) Head() *LinkedListNode[T]
func (*LinkedList[T]) Init ¶
func (ll *LinkedList[T]) Init() *LinkedList[T]
func (*LinkedList[T]) InsertAfter ¶
func (ll *LinkedList[T]) InsertAfter(node, mark *LinkedListNode[T])
func (*LinkedList[T]) InsertBefore ¶
func (ll *LinkedList[T]) InsertBefore(node, mark *LinkedListNode[T])
func (*LinkedList[T]) Len ¶
func (ll *LinkedList[T]) Len() int
func (*LinkedList[T]) PopBack ¶
func (ll *LinkedList[T]) PopBack() *LinkedListNode[T]
func (*LinkedList[T]) PopFront ¶
func (ll *LinkedList[T]) PopFront() *LinkedListNode[T]
func (*LinkedList[T]) PushBack ¶
func (ll *LinkedList[T]) PushBack(node *LinkedListNode[T])
func (*LinkedList[T]) PushFront ¶
func (ll *LinkedList[T]) PushFront(node *LinkedListNode[T])
func (*LinkedList[T]) Tail ¶
func (ll *LinkedList[T]) Tail() *LinkedListNode[T]
func (*LinkedList[T]) Unlink ¶
func (ll *LinkedList[T]) Unlink(node *LinkedListNode[T])
type LinkedListNode ¶
type LinkedListNode[T any] struct { Val T // contains filtered or unexported fields }
func (*LinkedListNode[T]) Next ¶
func (lln *LinkedListNode[T]) Next() *LinkedListNode[T]
func (*LinkedListNode[T]) Prev ¶
func (lln *LinkedListNode[T]) Prev() *LinkedListNode[T]
type RBTree ¶
func (*RBTree[K, V]) Add ¶
func (t *RBTree[K, V]) Add(key K, value V) *RBTreeNode[K, V]
func (*RBTree[K, V]) AddUnique ¶
func (t *RBTree[K, V]) AddUnique(key K, value V) (*RBTreeNode[K, V], bool)
func (*RBTree[K, V]) EqualRange ¶
func (t *RBTree[K, V]) EqualRange(key K) (*RBTreeNode[K, V], *RBTreeNode[K, V])
func (*RBTree[K, V]) Exist ¶
func (t *RBTree[K, V]) Exist(key K) (bool, *RBTreeNode[K, V])
func (*RBTree[K, V]) ForEach ¶
func (t *RBTree[K, V]) ForEach(f func(*RBTreeNode[K, V]))
func (*RBTree[K, V]) Head ¶
func (t *RBTree[K, V]) Head() *RBTreeNode[K, V]
func (*RBTree[K, V]) LowerBound ¶
func (t *RBTree[K, V]) LowerBound(key K) *RBTreeNode[K, V]
func (*RBTree[K, V]) RemoveAt ¶
func (t *RBTree[K, V]) RemoveAt(node *RBTreeNode[K, V])
func (*RBTree[K, V]) RemoveRange ¶
func (t *RBTree[K, V]) RemoveRange(nodeBegin, nodeEnd *RBTreeNode[K, V]) int
func (*RBTree[K, V]) Tail ¶
func (t *RBTree[K, V]) Tail() *RBTreeNode[K, V]
func (*RBTree[K, V]) UpperBound ¶
func (t *RBTree[K, V]) UpperBound(key K) *RBTreeNode[K, V]
type RBTreeNode ¶
func (*RBTreeNode[K, V]) Key ¶
func (n *RBTreeNode[K, V]) Key() K
func (*RBTreeNode[K, V]) Next ¶
func (n *RBTreeNode[K, V]) Next() *RBTreeNode[K, V]
func (*RBTreeNode[K, V]) Prev ¶
func (n *RBTreeNode[K, V]) Prev() *RBTreeNode[K, V]
type SkipList ¶
func (*SkipList[K, V]) Add ¶
func (sl *SkipList[K, V]) Add(key K, value V) (*SkipListNode[K, V], bool)
func (*SkipList[K, V]) Get ¶
func (sl *SkipList[K, V]) Get(key K) *SkipListNode[K, V]
func (*SkipList[K, V]) Remove ¶
func (sl *SkipList[K, V]) Remove(key K) *SkipListNode[K, V]
type SkipListNode ¶
func (*SkipListNode[K, V]) Key ¶
func (sln *SkipListNode[K, V]) Key() K
Click to show internal directories.
Click to hide internal directories.