Documentation ¶
Index ¶
- type Set
- func (s *Set) Add(items ...float64) *Set
- func (s *Set) Clear() *Set
- func (s *Set) Clone() *Set
- func (s *Set) Contains(items ...float64) bool
- func (s *Set) ContainsAny(items ...float64) bool
- func (s *Set) Delete(items ...float64) *Set
- func (s *Set) Difference(others ...*Set) *Set
- func (s *Set) Equal(other *Set) bool
- func (s *Set) Filter(f func(float64) bool) *Set
- func (s *Set) FilterItems(f func(float64) bool) (res []float64)
- func (s *Set) Intersection(others ...*Set) *Set
- func (s *Set) Items() (res []float64)
- func (s *Set) Size() int
- func (s *Set) Union(others ...*Set) *Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶ added in v0.7.0
type Set struct {
// contains filtered or unexported fields
}
func NewIntersection ¶ added in v0.11.4
Create a new set that is the intersection of all provided sets
func (*Set) ContainsAny ¶ added in v0.8.0
Check if the set contains any of the given items
func (*Set) Difference ¶ added in v0.12.1
Difference removes items that are in the other sets. This mutates the set.
func (*Set) Filter ¶ added in v0.12.0
Filter removes all items from the set that do not match the given filter function. This mutates the set.
func (*Set) FilterItems ¶ added in v0.12.0
FilterItems returns a slice of items from the set that match the given filter function.
func (*Set) Intersection ¶ added in v0.10.0
Intersection will reduce this set to the items that are present in this set and the other sets. This mutates the set.
Click to show internal directories.
Click to hide internal directories.