Versions in this module Expand all Collapse all v0 v0.12.0 Dec 27, 2022 Changes in this version + type BST interface + Delete func(cmp CompareFunc[K], key K) P + DeleteNode func(n N) P + Insert func(cmp CompareFunc[K], newNode P, key K, value V) + Max func() N + Min func() N + Search func(cmp CompareFunc[K], key K) (N, bool) + Size func() int + type BSTNodePtr interface + GetKey func() KeyType + Head func(cmp CompareFunc[KeyType]) Self + IsNull func() bool + Max func() Self + Min func() Self + Predecessor func() Self + SetValue func(ValueType) + Successor func() Self + Tail func(cmp CompareFunc[KeyType]) Self + Value func() ValueType + type CompareFunc func(a, b T) int64 + type KeyValuePair struct + K K + V V + func (n *KeyValuePair[K, V]) Get() (*K, *V) + func (n *KeyValuePair[K, V]) GetKey() K + func (n *KeyValuePair[K, V]) Set(key *K, value *V) + func (n *KeyValuePair[K, V]) SetValue(v V) + func (n *KeyValuePair[K, V]) Value() V + type RedBlackNode struct + func (n *RedBlackNode) Predecessor() *T + func (n *RedBlackNode) Successor() *T + func (n *RedBlackNode[K, V, P]) ForEachToTail(cmp CompareFunc[K], check func(*RedBlackNode[K, V, P])) + func (n *RedBlackNode[K, V, P]) Head(cmp CompareFunc[K]) *RedBlackNode[K, V, P] + func (n *RedBlackNode[K, V, P]) IsNull() bool + func (n *RedBlackNode[K, V, P]) Tail(cmp CompareFunc[K]) *RedBlackNode[K, V, P] + func (p *RedBlackNode) Max() *T + func (p *RedBlackNode) Min() *T + type RedBlackTree struct + func (t *RedBlackTree[K, V, P]) Delete(cmp CompareFunc[K], key K) P + func (t *RedBlackTree[K, V, P]) DeleteNode(node *RedBlackNode[K, V, P]) P + func (t *RedBlackTree[K, V, P]) Insert(cmp CompareFunc[K], newNode P, key K, value V) + func (t *RedBlackTree[K, V, P]) InsertNode(cmp CompareFunc[K], n P) + func (t RedBlackTree[K, V, P]) Max() *RedBlackNode[K, V, P] + func (t RedBlackTree[K, V, P]) Min() *RedBlackNode[K, V, P] + func (t RedBlackTree[K, V, P]) Search(cmp CompareFunc[K], key K) (node *RedBlackNode[K, V, P], _ bool) + func (t RedBlackTree[K, V, P]) Size() int + type RedBlackTreeOptions struct + AllowDupKey bool