zset

package
v0.10.15 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashSet

type HashSet[T any, K comparable] struct {
	// contains filtered or unexported fields
}

func NewHashSet

func NewHashSet[T any, K comparable](hash Hasher[T, K], vals ...T) *HashSet[T, K]

func (*HashSet[T, K]) Add

func (s *HashSet[T, K]) Add(items ...T)

func (*HashSet[T, K]) Clear

func (s *HashSet[T, K]) Clear()

func (*HashSet[T, K]) Clone

func (s *HashSet[T, K]) Clone() *HashSet[T, K]

func (*HashSet[T, K]) Complement

func (s *HashSet[T, K]) Complement(others ...HashSet[T, K])

func (HashSet[T, K]) Contains

func (s HashSet[T, K]) Contains(item T) bool

func (HashSet[T, K]) ContainsAll

func (s HashSet[T, K]) ContainsAll(items ...T) bool

func (HashSet[T, K]) ContainsAny

func (s HashSet[T, K]) ContainsAny(items ...T) bool

func (*HashSet[T, K]) Delete

func (s *HashSet[T, K]) Delete(items ...T)

func (*HashSet[T, K]) Intersection

func (s *HashSet[T, K]) Intersection(others ...HashSet[T, K]) *HashSet[T, K]

func (*HashSet[T, K]) Items

func (s *HashSet[T, K]) Items() (res []T)

func (*HashSet[T, K]) Size

func (s *HashSet[T, K]) Size() int

func (*HashSet[T, K]) Union

func (s *HashSet[T, K]) Union(others ...HashSet[T, K])

type Hasher

type Hasher[T any, K comparable] func(T) K

type Set

type Set[T comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T comparable](vals ...T) *Set[T]

func (*Set[T]) Add

func (s *Set[T]) Add(items ...T)

func (*Set[T]) Clear

func (s *Set[T]) Clear()

func (*Set[T]) Clone

func (s *Set[T]) Clone() *Set[T]

func (*Set[T]) Complement

func (s *Set[T]) Complement(others ...Set[T])

func (Set[T]) Contains

func (s Set[T]) Contains(item T) bool

func (Set[T]) ContainsAll

func (s Set[T]) ContainsAll(items ...T) bool

func (Set[T]) ContainsAny

func (s Set[T]) ContainsAny(items ...T) bool

func (*Set[T]) Delete

func (s *Set[T]) Delete(items ...T)

func (*Set[T]) Intersection

func (s *Set[T]) Intersection(others ...Set[T]) *Set[T]

func (*Set[T]) Items

func (s *Set[T]) Items() (res []T)

func (*Set[T]) Size

func (s *Set[T]) Size() int

func (*Set[T]) Union

func (s *Set[T]) Union(others ...Set[T])

Jump to

Keyboard shortcuts

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