zfloat64set

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 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 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)

Add items to the set

func (*Set) Clear added in v0.7.0

func (s *Set) Clear()

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) Complement added in v0.7.0

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

Complement removes items that are not in the other sets

func (Set) Contains added in v0.7.0

func (s Set) Contains(item float64) bool

Check if the set contains the given item

func (Set) ContainsAll added in v0.8.0

func (s Set) ContainsAll(items ...float64) bool

Check if the set contains all 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)

Delete items from 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) Intersection added in v0.10.0

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

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

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)

Union adds all the items of the other sets to this set

Jump to

Keyboard shortcuts

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