Documentation ¶
Index ¶
- func ArrayIntToInt64(v []int) []int64
- func HashInt(v any) uint64
- func HashIntArray(v []int) uint64
- func HashString(v string) uint64
- func Rehash(v uint64) uint64
- type Set
- func (s Set[K]) Difference(a Set[K]) Set[K]
- func (s Set[K]) Each(fn func(key K))
- func (s Set[K]) Equals(element SetElement) bool
- func (s Set[K]) GetHash() uint64
- func (s Set[K]) Has(val K) bool
- func (s Set[K]) IsSuperset(a Set[K]) bool
- func (s Set[K]) Size() int
- func (s Set[K]) ToHashSet() hashset.Set[K]
- func (s Set[K]) ToSlice() []K
- func (s Set[K]) Union(a Set[K]) Set[K]
- type SetElement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayIntToInt64 ¶
func HashIntArray ¶
func HashString ¶
Types ¶
type Set ¶
type Set[K SetElement] struct { // contains filtered or unexported fields }
func FromHashSet ¶
func FromHashSet[K SetElement](set *hashset.Set[K]) *Set[K]
func Of ¶
func Of[K SetElement](vals ...K) *Set[K]
Of returns a new hashset initialized with the given 'vals'
func (Set[K]) Difference ¶
func (Set[K]) Equals ¶
func (s Set[K]) Equals(element SetElement) bool
func (Set[K]) IsSuperset ¶
type SetElement ¶
type SetElement interface { GetHash() uint64 Equals(element SetElement) bool }
Click to show internal directories.
Click to hide internal directories.