intset

package
v1.116.0-rc Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: AGPL-3.0 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

type Set struct {
	// contains filtered or unexported fields
}

Set set of int values.

func NewSet

func NewSet(size int) Set

NewSet creates new int set.

func (*Set) Add

func (s *Set) Add(sources ...Set)

Add adds to the set content of other sets. Sources sets with different size than target will be ignored.

func (Set) Contains

func (s Set) Contains(value int) bool

Contains returns true if set includes int value. Ignores negative values and above set length.

func (Set) Count

func (s Set) Count() int

Count returns number of int values in a set.

func (*Set) Exclude

func (s *Set) Exclude(value int)

Exclude removes int value from set. Ignores negative values and above set length.

func (*Set) Include

func (s *Set) Include(value int)

Include includes int value into set. Ignores negative values and above set length.

Jump to

Keyboard shortcuts

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