tidb: github.com/pingcap/tidb/util/set Index | Files

package set

import "github.com/pingcap/tidb/util/set"

Index

Package Files

float64_set.go int_set.go string_set.go

type Float64Set Uses

type Float64Set map[float64]struct{}

Float64Set is a float64 set.

func NewFloat64Set Uses

func NewFloat64Set(fs ...float64) Float64Set

NewFloat64Set builds a float64 set.

func (Float64Set) Count Uses

func (s Float64Set) Count() int

Count returns the number in Set s.

func (Float64Set) Exist Uses

func (s Float64Set) Exist(val float64) bool

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

func (Float64Set) Insert Uses

func (s Float64Set) Insert(val float64)

Insert inserts `val` into `s`.

type Int64Set Uses

type Int64Set map[int64]struct{}

Int64Set is a int64 set.

func NewInt64Set Uses

func NewInt64Set(xs ...int64) Int64Set

NewInt64Set builds a Int64Set.

func (Int64Set) Count Uses

func (s Int64Set) Count() int

Count returns the number in Set s.

func (Int64Set) Exist Uses

func (s Int64Set) Exist(val int64) bool

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

func (Int64Set) Insert Uses

func (s Int64Set) Insert(val int64)

Insert inserts `val` into `s`.

type IntSet Uses

type IntSet map[int]struct{}

IntSet is a int set.

func NewIntSet Uses

func NewIntSet() IntSet

NewIntSet builds a IntSet.

func (IntSet) Count Uses

func (s IntSet) Count() int

Count returns the number in Set s.

func (IntSet) Exist Uses

func (s IntSet) Exist(val int) bool

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

func (IntSet) Insert Uses

func (s IntSet) Insert(val int)

Insert inserts `val` into `s`.

type StringSet Uses

type StringSet map[string]struct{}

StringSet is a string set.

func NewStringSet Uses

func NewStringSet(ss ...string) StringSet

NewStringSet builds a string set.

func (StringSet) Count Uses

func (s StringSet) Count() int

Count returns the number in Set s.

func (StringSet) Exist Uses

func (s StringSet) Exist(val string) bool

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

func (StringSet) Insert Uses

func (s StringSet) Insert(val string)

Insert inserts `val` into `s`.

func (StringSet) Intersection Uses

func (s StringSet) Intersection(rhs StringSet) StringSet

Intersection returns the intersection of two sets

Package set is imported by 51 packages. Updated 2020-05-28. Refresh now. Tools for package owners.