zfloat64set

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

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 New

func New(items ...float64) (s *Set)

Create a new set with the given items

func NewIntersection added in v0.11.4

func NewIntersection(sets ...*Set) *Set

Create a new set that is the intersection of all provided sets

func NewUnion added in v0.11.4

func NewUnion(sets ...*Set) (s *Set)

Create a new set that is the union of all provided sets

func (*Set) Add added in v0.7.0

func (s *Set) Add(items ...float64) *Set

Add items to the set

func (*Set) Clear added in v0.7.0

func (s *Set) Clear() *Set

Remove all items from the set

func (*Set) Clone added in v0.7.0

func (s *Set) Clone() *Set

Return a new set that contains the same items as the original

func (*Set) Contains added in v0.7.0

func (s *Set) Contains(items ...float64) bool

Check if the set contains all of the given items

func (*Set) ContainsAny added in v0.8.0

func (s *Set) ContainsAny(items ...float64) bool

Check if the set contains any of the given items

func (*Set) Delete added in v0.7.0

func (s *Set) Delete(items ...float64) *Set

Delete items from the set

func (*Set) Difference added in v0.12.1

func (s *Set) Difference(others ...*Set) *Set

Difference removes items that are in the other sets. This mutates the set.

func (*Set) Equal added in v0.11.4

func (s *Set) Equal(other *Set) bool

Equal returns if boths sets contain the same items

func (*Set) Filter added in v0.12.0

func (s *Set) Filter(f func(float64) bool) *Set

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

func (s *Set) FilterItems(f func(float64) bool) (res []float64)

FilterItems returns a slice of items from the set that match the given filter function.

func (*Set) Intersection added in v0.10.0

func (s *Set) Intersection(others ...*Set) *Set

Intersection will reduce this set to the items that are present in this set and the other sets. This mutates the set.

func (*Set) Items added in v0.7.0

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

Items returns a slice with the items of the set

func (*Set) Size added in v0.7.0

func (s *Set) Size() int

Size returns the size of the set

func (*Set) Union added in v0.7.0

func (s *Set) Union(others ...*Set) *Set

Union adds all the items of the other sets to this set. This mutates the set.

Jump to

Keyboard shortcuts

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