Documentation ¶
Index ¶
- type Set
- func (s *Set[T]) Difference(set *Set[T]) *Set[T]
- func (s *Set[T]) ForEach(f func(elem T))
- func (s *Set[T]) Has(element T) bool
- func (s *Set[T]) Insert(element T)
- func (s *Set[T]) Intersection(set *Set[T]) *Set[T]
- func (s *Set[T]) Len() int
- func (s *Set[T]) ProperSubsetOf(set *Set[T]) bool
- func (s *Set[T]) Remove(element T)
- func (s *Set[T]) SubsetOf(set *Set[T]) bool
- func (s *Set[T]) Union(set *Set[T]) *Set[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
Generic Set data structure implemention.
func (*Set[T]) Difference ¶
Find the difference between two sets
func (*Set[T]) Intersection ¶
Find the intersection of two sets
func (*Set[T]) ProperSubsetOf ¶
Test whether or not this set is a proper subset of "set"
Click to show internal directories.
Click to hide internal directories.