Documentation
¶
Index ¶
- type Set
- func (s *Set[K]) Clone() (new *Set[K])
- func (s *Set[K]) Diff(s1 *Set[K]) (new *Set[K])
- func (s *Set[K]) Equal(s1 *Set[K]) (b bool)
- func (s *Set[K]) Intersection(s1 *Set[K]) (new *Set[K])
- func (s *Set[K]) IsMember(k K) (b bool)
- func (s *Set[K]) IsSubset(s1 *Set[K]) (b bool)
- func (s *Set[K]) IsSuperset(s1 *Set[K]) (b bool)
- func (s *Set[K]) Len() int
- func (s *Set[K]) Range(cb func(k K) bool)
- func (s *Set[K]) Set(k K)
- func (s *Set[K]) ToSlice() (new []K)
- func (s *Set[K]) Union(sets ...*Set[K]) (new *Set[K])
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[K constraints.Ordered] struct { api.SortedMap[K, struct{}] }
func (*Set[K]) IsSuperset ¶
测试集合s1每个元素是否在s里面 s1 <= s
Click to show internal directories.
Click to hide internal directories.