Documentation
¶
Index ¶
- func IterateMergedBinarySearchGrowingKVKeys[K any, V any, W any](a *BinarySearchGrowingKV[K, V], b *BinarySearchGrowingKV[K, W]) iter.Seq[K]
- func IterateSortedUniqueFuncUnique[T any](s1 []T, s2 []T, compare func(a, b T) int) iter.Seq[T]
- func IterateSortedUniqueOrderedUnique[T constraints.Ordered](s1 []T, s2 []T) iter.Seq[T]
- type BinarySearchGrowingKV
- func (inst *BinarySearchGrowingKV[K, V]) Get(key K) (val V, has bool)
- func (inst *BinarySearchGrowingKV[K, V]) GetDefault(key K, defaultV V) (val V)
- func (inst *BinarySearchGrowingKV[K, V]) Has(key K) (has bool)
- func (inst *BinarySearchGrowingKV[K, V]) IterateKeys() iter.Seq[K]
- func (inst *BinarySearchGrowingKV[K, V]) IteratePairs() iter.Seq2[K, V]
- func (inst *BinarySearchGrowingKV[K, V]) IterateValues() iter.Seq[V]
- func (inst *BinarySearchGrowingKV[K, V]) Len() int
- func (inst *BinarySearchGrowingKV[K, V]) Less(i, j int) bool
- func (inst *BinarySearchGrowingKV[K, V]) MergeValue(key K, val V, merge func(old V, new V) V) (existed bool)
- func (inst *BinarySearchGrowingKV[K, V]) Reset()
- func (inst *BinarySearchGrowingKV[K, V]) Swap(i, j int)
- func (inst *BinarySearchGrowingKV[K, V]) UpsertBatch(key K, val V)
- func (inst *BinarySearchGrowingKV[K, V]) UpsertSingle(key K, val V) (existed bool)
- type HashSet
- func (inst *HashSet[T]) Add(val T)
- func (inst *HashSet[T]) AddEx(val T) (existed bool)
- func (inst *HashSet[T]) AddExMany(vals iter.Seq[T]) (existing int, nonExisting int)
- func (inst *HashSet[T]) AddMany(vals iter.Seq[T]) (added int)
- func (inst *HashSet[T]) Clear()
- func (inst *HashSet[T]) DifferenceMod(other *HashSet[T])
- func (inst *HashSet[T]) Equal(other HashSet[T]) bool
- func (inst *HashSet[T]) Has(val T) bool
- func (inst *HashSet[T]) IntersectMod(other *HashSet[T])
- func (inst *HashSet[T]) IterateAll() iter.Seq[T]
- func (inst *HashSet[T]) Remove(val T)
- func (inst *HashSet[T]) RemoveEx(val T) (had bool)
- func (inst *HashSet[T]) Size() int
- func (inst *HashSet[T]) Slice() []T
- func (inst *HashSet[T]) SliceEx(in []T) (out []T)
- func (inst *HashSet[T]) UnionMod(other *HashSet[T])
- type Stack
- func (stack *Stack[T]) Depth() int
- func (stack *Stack[T]) Peek() (retr T, err error)
- func (stack *Stack[T]) PeekDefault(emptyValue T) (retr T)
- func (stack *Stack[T]) Pop() (retr T, err error)
- func (stack *Stack[T]) PopDefault(emptyValue T) (retr T)
- func (stack *Stack[T]) Push(value T)
- func (stack *Stack[T]) Reset()
- func (stack *Stack[T]) Swap(newValue T) (oldValue T, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IterateMergedBinarySearchGrowingKVKeys ¶
func IterateMergedBinarySearchGrowingKVKeys[K any, V any, W any](a *BinarySearchGrowingKV[K, V], b *BinarySearchGrowingKV[K, W]) iter.Seq[K]
func IterateSortedUniqueOrderedUnique ¶
func IterateSortedUniqueOrderedUnique[T constraints.Ordered](s1 []T, s2 []T) iter.Seq[T]
Types ¶
type BinarySearchGrowingKV ¶
func NewBinarySearchGrowingKV ¶
func NewBinarySearchGrowingKV[K any, V any](estSize int, cmpKey func(a K, b K) int) (inst *BinarySearchGrowingKV[K, V])
func (*BinarySearchGrowingKV[K, V]) Get ¶
func (inst *BinarySearchGrowingKV[K, V]) Get(key K) (val V, has bool)
func (*BinarySearchGrowingKV[K, V]) GetDefault ¶
func (inst *BinarySearchGrowingKV[K, V]) GetDefault(key K, defaultV V) (val V)
func (*BinarySearchGrowingKV[K, V]) Has ¶
func (inst *BinarySearchGrowingKV[K, V]) Has(key K) (has bool)
func (*BinarySearchGrowingKV[K, V]) IterateKeys ¶
func (inst *BinarySearchGrowingKV[K, V]) IterateKeys() iter.Seq[K]
func (*BinarySearchGrowingKV[K, V]) IteratePairs ¶
func (inst *BinarySearchGrowingKV[K, V]) IteratePairs() iter.Seq2[K, V]
func (*BinarySearchGrowingKV[K, V]) IterateValues ¶
func (inst *BinarySearchGrowingKV[K, V]) IterateValues() iter.Seq[V]
func (*BinarySearchGrowingKV[K, V]) Len ¶
func (inst *BinarySearchGrowingKV[K, V]) Len() int
func (*BinarySearchGrowingKV[K, V]) Less ¶
func (inst *BinarySearchGrowingKV[K, V]) Less(i, j int) bool
func (*BinarySearchGrowingKV[K, V]) MergeValue ¶
func (inst *BinarySearchGrowingKV[K, V]) MergeValue(key K, val V, merge func(old V, new V) V) (existed bool)
func (*BinarySearchGrowingKV[K, V]) Reset ¶
func (inst *BinarySearchGrowingKV[K, V]) Reset()
func (*BinarySearchGrowingKV[K, V]) Swap ¶
func (inst *BinarySearchGrowingKV[K, V]) Swap(i, j int)
func (*BinarySearchGrowingKV[K, V]) UpsertBatch ¶
func (inst *BinarySearchGrowingKV[K, V]) UpsertBatch(key K, val V)
UpsertBatch last write wins
func (*BinarySearchGrowingKV[K, V]) UpsertSingle ¶
func (inst *BinarySearchGrowingKV[K, V]) UpsertSingle(key K, val V) (existed bool)
type HashSet ¶
type HashSet[T comparable] struct { // contains filtered or unexported fields }
func NewHashSet ¶
func NewHashSet[T comparable](estimatedCard int) *HashSet[T]
func (*HashSet[T]) DifferenceMod ¶
func (*HashSet[T]) IntersectMod ¶
func (*HashSet[T]) IterateAll ¶
type Stack ¶
type Stack[T any] struct { Items []T }
func NewStackSized ¶
func (*Stack[T]) PeekDefault ¶
func (stack *Stack[T]) PeekDefault(emptyValue T) (retr T)
func (*Stack[T]) PopDefault ¶
func (stack *Stack[T]) PopDefault(emptyValue T) (retr T)
Click to show internal directories.
Click to hide internal directories.