zfloat32set

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 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 ...float32) (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 ...float32) *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) Complement added in v0.7.0

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

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

func (*Set) Contains added in v0.7.0

func (s *Set) Contains(item float32) bool

Check if the set contains the given item

func (*Set) ContainsAll added in v0.8.0

func (s *Set) ContainsAll(items ...float32) bool

Check if the set contains all the given items

func (*Set) ContainsAny added in v0.8.0

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

Check if the set contains any of the given items

func (*Set) Delete added in v0.7.0

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

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) *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 []float32)

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