collectionx

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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 (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

type RBTree[K any, V any] struct {
	// contains filtered or unexported fields
}

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]) Clear

func (t *RBTree[K, V]) Clear()

func (*RBTree[K, V]) Count

func (t *RBTree[K, V]) Count(key K) int

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]) Init

func (t *RBTree[K, V]) Init(lessOp func(K, K) bool) *RBTree[K, V]

func (*RBTree[K, V]) Len

func (t *RBTree[K, V]) Len() int

func (*RBTree[K, V]) LowerBound

func (t *RBTree[K, V]) LowerBound(key K) *RBTreeNode[K, V]

func (*RBTree[K, V]) Remove

func (t *RBTree[K, V]) Remove(key K) int

func (*RBTree[K, V]) RemoveAt

func (t *RBTree[K, V]) RemoveAt(node *RBTreeNode[K, V])

func (*RBTree[K, V]) RemoveOne

func (t *RBTree[K, V]) RemoveOne(key K)

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

type RBTreeNode[K any, V any] struct {
	Value V
	// contains filtered or unexported fields
}

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

type SkipList[K any, V any] struct {
	// contains filtered or unexported fields
}

func (*SkipList[K, V]) Add

func (sl *SkipList[K, V]) Add(key K, value V) (*SkipListNode[K, V], bool)

func (*SkipList[K, V]) Clear

func (sl *SkipList[K, V]) Clear()

func (*SkipList[K, V]) Get

func (sl *SkipList[K, V]) Get(key K) *SkipListNode[K, V]

func (*SkipList[K, V]) Init

func (sl *SkipList[K, V]) Init(lessOp func(K, K) bool) *SkipList[K, V]

func (*SkipList[K, V]) Len

func (sl *SkipList[K, V]) Len() int

func (*SkipList[K, V]) Remove

func (sl *SkipList[K, V]) Remove(key K) *SkipListNode[K, V]

type SkipListNode

type SkipListNode[K any, V any] struct {
	Value V
	// contains filtered or unexported fields
}

func (*SkipListNode[K, V]) Key

func (sln *SkipListNode[K, V]) Key() K

type TreeMap

type TreeMap[K any, V any] struct {
	// contains filtered or unexported fields
}

func (*TreeMap[K, V]) Add

func (tm *TreeMap[K, V]) Add(key K, value V) bool

func (*TreeMap[K, V]) Clear

func (tm *TreeMap[K, V]) Clear()

func (*TreeMap[K, V]) ForEach

func (tm *TreeMap[K, V]) ForEach(f func(K, *V))

func (*TreeMap[K, V]) Get

func (tm *TreeMap[K, V]) Get(key K) *V

func (*TreeMap[K, V]) Init

func (tm *TreeMap[K, V]) Init(lessOp func(K, K) bool) *TreeMap[K, V]

func (*TreeMap[K, V]) Len

func (tm *TreeMap[K, V]) Len() int

func (*TreeMap[K, V]) Remove

func (tm *TreeMap[K, V]) Remove(key K)

func (*TreeMap[K, V]) Set

func (tm *TreeMap[K, V]) Set(key K, value V)

type TreeSet

type TreeSet[T any] struct {
	// contains filtered or unexported fields
}

func (*TreeSet[T]) Add

func (ts *TreeSet[T]) Add(elem T)

func (*TreeSet[T]) Clear

func (ts *TreeSet[T]) Clear()

func (*TreeSet[T]) Exist

func (ts *TreeSet[T]) Exist(elem T) bool

func (*TreeSet[T]) ForEach

func (ts *TreeSet[T]) ForEach(f func(T))

func (*TreeSet[T]) Init

func (ts *TreeSet[T]) Init(lessOp func(T, T) bool) *TreeSet[T]

func (*TreeSet[T]) Len

func (ts *TreeSet[T]) Len() int

func (*TreeSet[T]) Remove

func (ts *TreeSet[T]) Remove(elem T)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL