set

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0, Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Float64Set

type Float64Set map[float64]struct{}

Float64Set is a float64 set.

func NewFloat64Set

func NewFloat64Set(fs ...float64) Float64Set

NewFloat64Set builds a float64 set.

func (Float64Set) Count

func (s Float64Set) Count() int

Count returns the number in Set s.

func (Float64Set) Exist

func (s Float64Set) Exist(val float64) bool

Exist checks whether `val` exists in `s`.

func (Float64Set) Insert

func (s Float64Set) Insert(val float64)

Insert inserts `val` into `s`.

type Int64Set

type Int64Set map[int64]struct{}

Int64Set is a int64 set.

func NewInt64Set

func NewInt64Set(xs ...int64) Int64Set

NewInt64Set builds a Int64Set.

func (Int64Set) Count

func (s Int64Set) Count() int

Count returns the number in Set s.

func (Int64Set) Exist

func (s Int64Set) Exist(val int64) bool

Exist checks whether `val` exists in `s`.

func (Int64Set) Insert

func (s Int64Set) Insert(val int64)

Insert inserts `val` into `s`.

type StringSet

type StringSet map[string]struct{}

StringSet is a string set.

func NewStringSet

func NewStringSet(ss ...string) StringSet

NewStringSet builds a string set.

func (StringSet) Count

func (s StringSet) Count() int

Count returns the number in Set s.

func (StringSet) Exist

func (s StringSet) Exist(val string) bool

Exist checks whether `val` exists in `s`.

func (StringSet) Insert

func (s StringSet) Insert(val string)

Insert inserts `val` into `s`.

func (StringSet) Intersection

func (s StringSet) Intersection(rhs StringSet) StringSet

Intersection returns the intersection of two sets

Jump to

Keyboard shortcuts

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