set

package
v0.0.0-...-0ec8b3e Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

README

高效集合

示例

func s() {
	s := NewIntSet()
	s.Add(1)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolSet

type BoolSet map[bool]struct{}

func NewBoolSet

func NewBoolSet(keys ...bool) BoolSet

func (BoolSet) Add

func (s BoolSet) Add(key bool)

func (BoolSet) AddAll

func (s BoolSet) AddAll(keys ...bool)

func (BoolSet) Contains

func (s BoolSet) Contains(key bool) bool

func (BoolSet) Equal

func (s BoolSet) Equal(s2 BoolSet) bool

func (BoolSet) Exist

func (s BoolSet) Exist(key bool) bool

func (BoolSet) Intersect

func (s BoolSet) Intersect(s2 BoolSet) BoolSet

func (BoolSet) IsEmpty

func (s BoolSet) IsEmpty() bool

func (BoolSet) Minus

func (s BoolSet) Minus(s2 BoolSet) BoolSet

func (BoolSet) MinusInPlace

func (s BoolSet) MinusInPlace(s2 BoolSet)

func (BoolSet) Remove

func (s BoolSet) Remove(key bool)

func (BoolSet) Size

func (s BoolSet) Size() int

func (BoolSet) ToList

func (s BoolSet) ToList() []bool

func (BoolSet) Union

func (s BoolSet) Union(s2 BoolSet) BoolSet

type Float32Set

type Float32Set map[float32]struct{}

func NewFloat32Set

func NewFloat32Set(keys ...float32) Float32Set

func (Float32Set) Add

func (s Float32Set) Add(key float32)

func (Float32Set) AddAll

func (s Float32Set) AddAll(keys ...float32)

func (Float32Set) Contains

func (s Float32Set) Contains(key float32) bool

func (Float32Set) Equal

func (s Float32Set) Equal(s2 Float32Set) bool

func (Float32Set) Exist

func (s Float32Set) Exist(key float32) bool

func (Float32Set) Intersect

func (s Float32Set) Intersect(s2 Float32Set) Float32Set

func (Float32Set) IsEmpty

func (s Float32Set) IsEmpty() bool

func (Float32Set) Minus

func (s Float32Set) Minus(s2 Float32Set) Float32Set

func (Float32Set) MinusInPlace

func (s Float32Set) MinusInPlace(s2 Float32Set)

func (Float32Set) Remove

func (s Float32Set) Remove(key float32)

func (Float32Set) Size

func (s Float32Set) Size() int

func (Float32Set) ToList

func (s Float32Set) ToList() []float32

func (Float32Set) Union

func (s Float32Set) Union(s2 Float32Set) Float32Set

type Float64Set

type Float64Set map[float64]struct{}

func NewFloat64Set

func NewFloat64Set(keys ...float64) Float64Set

func (Float64Set) Add

func (s Float64Set) Add(key float64)

func (Float64Set) AddAll

func (s Float64Set) AddAll(keys ...float64)

func (Float64Set) Contains

func (s Float64Set) Contains(key float64) bool

func (Float64Set) Equal

func (s Float64Set) Equal(s2 Float64Set) bool

func (Float64Set) Exist

func (s Float64Set) Exist(key float64) bool

func (Float64Set) Intersect

func (s Float64Set) Intersect(s2 Float64Set) Float64Set

func (Float64Set) IsEmpty

func (s Float64Set) IsEmpty() bool

func (Float64Set) Minus

func (s Float64Set) Minus(s2 Float64Set) Float64Set

func (Float64Set) MinusInPlace

func (s Float64Set) MinusInPlace(s2 Float64Set)

func (Float64Set) Remove

func (s Float64Set) Remove(key float64)

func (Float64Set) Size

func (s Float64Set) Size() int

func (Float64Set) ToList

func (s Float64Set) ToList() []float64

func (Float64Set) Union

func (s Float64Set) Union(s2 Float64Set) Float64Set

type Int16Set

type Int16Set map[int16]struct{}

func NewInt16Set

func NewInt16Set(keys ...int16) Int16Set

func (Int16Set) Add

func (s Int16Set) Add(key int16)

func (Int16Set) AddAll

func (s Int16Set) AddAll(keys ...int16)

func (Int16Set) Contains

func (s Int16Set) Contains(key int16) bool

func (Int16Set) Equal

func (s Int16Set) Equal(s2 Int16Set) bool

func (Int16Set) Exist

func (s Int16Set) Exist(key int16) bool

func (Int16Set) Intersect

func (s Int16Set) Intersect(s2 Int16Set) Int16Set

func (Int16Set) IsEmpty

func (s Int16Set) IsEmpty() bool

func (Int16Set) Minus

func (s Int16Set) Minus(s2 Int16Set) Int16Set

func (Int16Set) MinusInPlace

func (s Int16Set) MinusInPlace(s2 Int16Set)

func (Int16Set) Remove

func (s Int16Set) Remove(key int16)

func (Int16Set) Size

func (s Int16Set) Size() int

func (Int16Set) ToList

func (s Int16Set) ToList() []int16

func (Int16Set) Union

func (s Int16Set) Union(s2 Int16Set) Int16Set

type Int32Set

type Int32Set map[int32]struct{}

func NewInt32Set

func NewInt32Set(keys ...int32) Int32Set

func (Int32Set) Add

func (s Int32Set) Add(key int32)

func (Int32Set) AddAll

func (s Int32Set) AddAll(keys ...int32)

func (Int32Set) Contains

func (s Int32Set) Contains(key int32) bool

func (Int32Set) Equal

func (s Int32Set) Equal(s2 Int32Set) bool

func (Int32Set) Exist

func (s Int32Set) Exist(key int32) bool

func (Int32Set) Intersect

func (s Int32Set) Intersect(s2 Int32Set) Int32Set

func (Int32Set) IsEmpty

func (s Int32Set) IsEmpty() bool

func (Int32Set) Minus

func (s Int32Set) Minus(s2 Int32Set) Int32Set

func (Int32Set) MinusInPlace

func (s Int32Set) MinusInPlace(s2 Int32Set)

func (Int32Set) Remove

func (s Int32Set) Remove(key int32)

func (Int32Set) Size

func (s Int32Set) Size() int

func (Int32Set) ToList

func (s Int32Set) ToList() []int32

func (Int32Set) Union

func (s Int32Set) Union(s2 Int32Set) Int32Set

type Int64Set

type Int64Set map[int64]struct{}

func NewInt64Set

func NewInt64Set(keys ...int64) Int64Set

func (Int64Set) Add

func (s Int64Set) Add(key int64)

func (Int64Set) AddAll

func (s Int64Set) AddAll(keys ...int64)

func (Int64Set) Contains

func (s Int64Set) Contains(key int64) bool

func (Int64Set) Equal

func (s Int64Set) Equal(s2 Int64Set) bool

func (Int64Set) Exist

func (s Int64Set) Exist(key int64) bool

func (Int64Set) Intersect

func (s Int64Set) Intersect(s2 Int64Set) Int64Set

func (Int64Set) IsEmpty

func (s Int64Set) IsEmpty() bool

func (Int64Set) Minus

func (s Int64Set) Minus(s2 Int64Set) Int64Set

func (Int64Set) MinusInPlace

func (s Int64Set) MinusInPlace(s2 Int64Set)

func (Int64Set) Remove

func (s Int64Set) Remove(key int64)

func (Int64Set) Size

func (s Int64Set) Size() int

func (Int64Set) ToList

func (s Int64Set) ToList() []int64

func (Int64Set) Union

func (s Int64Set) Union(s2 Int64Set) Int64Set

type Int8Set

type Int8Set map[int8]struct{}

func NewInt8Set

func NewInt8Set(keys ...int8) Int8Set

func (Int8Set) Add

func (s Int8Set) Add(key int8)

func (Int8Set) AddAll

func (s Int8Set) AddAll(keys ...int8)

func (Int8Set) Contains

func (s Int8Set) Contains(key int8) bool

func (Int8Set) Equal

func (s Int8Set) Equal(s2 Int8Set) bool

func (Int8Set) Exist

func (s Int8Set) Exist(key int8) bool

func (Int8Set) Intersect

func (s Int8Set) Intersect(s2 Int8Set) Int8Set

func (Int8Set) IsEmpty

func (s Int8Set) IsEmpty() bool

func (Int8Set) Minus

func (s Int8Set) Minus(s2 Int8Set) Int8Set

func (Int8Set) MinusInPlace

func (s Int8Set) MinusInPlace(s2 Int8Set)

func (Int8Set) Remove

func (s Int8Set) Remove(key int8)

func (Int8Set) Size

func (s Int8Set) Size() int

func (Int8Set) ToList

func (s Int8Set) ToList() []int8

func (Int8Set) Union

func (s Int8Set) Union(s2 Int8Set) Int8Set

type IntSet

type IntSet map[int]struct{}

func NewIntSet

func NewIntSet(keys ...int) IntSet

func (IntSet) Add

func (s IntSet) Add(key int)

func (IntSet) AddAll

func (s IntSet) AddAll(keys ...int)

func (IntSet) Contains

func (s IntSet) Contains(key int) bool

func (IntSet) Equal

func (s IntSet) Equal(s2 IntSet) bool

func (IntSet) Exist

func (s IntSet) Exist(key int) bool

func (IntSet) Intersect

func (s IntSet) Intersect(s2 IntSet) IntSet

func (IntSet) IsEmpty

func (s IntSet) IsEmpty() bool

func (IntSet) Minus

func (s IntSet) Minus(s2 IntSet) IntSet

func (IntSet) MinusInPlace

func (s IntSet) MinusInPlace(s2 IntSet)

func (IntSet) Remove

func (s IntSet) Remove(key int)

func (IntSet) Size

func (s IntSet) Size() int

func (IntSet) ToList

func (s IntSet) ToList() []int

func (IntSet) Union

func (s IntSet) Union(s2 IntSet) IntSet

type StringSet

type StringSet map[string]struct{}

func NewStringSet

func NewStringSet(keys ...string) StringSet

func (StringSet) Add

func (s StringSet) Add(key string)

func (StringSet) AddAll

func (s StringSet) AddAll(keys ...string)

func (StringSet) Contains

func (s StringSet) Contains(key string) bool

func (StringSet) Equal

func (s StringSet) Equal(s2 StringSet) bool

func (StringSet) Exist

func (s StringSet) Exist(key string) bool

func (StringSet) Intersect

func (s StringSet) Intersect(s2 StringSet) StringSet

func (StringSet) IsEmpty

func (s StringSet) IsEmpty() bool

func (StringSet) Minus

func (s StringSet) Minus(s2 StringSet) StringSet

func (StringSet) MinusInPlace

func (s StringSet) MinusInPlace(s2 StringSet)

func (StringSet) Remove

func (s StringSet) Remove(key string)

func (StringSet) Size

func (s StringSet) Size() int

func (StringSet) ToList

func (s StringSet) ToList() []string

func (StringSet) Union

func (s StringSet) Union(s2 StringSet) StringSet

type Uint16Set

type Uint16Set map[uint16]struct{}

func NewUint16Set

func NewUint16Set(keys ...uint16) Uint16Set

func (Uint16Set) Add

func (s Uint16Set) Add(key uint16)

func (Uint16Set) AddAll

func (s Uint16Set) AddAll(keys ...uint16)

func (Uint16Set) Contains

func (s Uint16Set) Contains(key uint16) bool

func (Uint16Set) Equal

func (s Uint16Set) Equal(s2 Uint16Set) bool

func (Uint16Set) Exist

func (s Uint16Set) Exist(key uint16) bool

func (Uint16Set) Intersect

func (s Uint16Set) Intersect(s2 Uint16Set) Uint16Set

func (Uint16Set) IsEmpty

func (s Uint16Set) IsEmpty() bool

func (Uint16Set) Minus

func (s Uint16Set) Minus(s2 Uint16Set) Uint16Set

func (Uint16Set) MinusInPlace

func (s Uint16Set) MinusInPlace(s2 Uint16Set)

func (Uint16Set) Remove

func (s Uint16Set) Remove(key uint16)

func (Uint16Set) Size

func (s Uint16Set) Size() int

func (Uint16Set) ToList

func (s Uint16Set) ToList() []uint16

func (Uint16Set) Union

func (s Uint16Set) Union(s2 Uint16Set) Uint16Set

type Uint32Set

type Uint32Set map[uint32]struct{}

func NewUint32Set

func NewUint32Set(keys ...uint32) Uint32Set

func (Uint32Set) Add

func (s Uint32Set) Add(key uint32)

func (Uint32Set) AddAll

func (s Uint32Set) AddAll(keys ...uint32)

func (Uint32Set) Contains

func (s Uint32Set) Contains(key uint32) bool

func (Uint32Set) Equal

func (s Uint32Set) Equal(s2 Uint32Set) bool

func (Uint32Set) Exist

func (s Uint32Set) Exist(key uint32) bool

func (Uint32Set) Intersect

func (s Uint32Set) Intersect(s2 Uint32Set) Uint32Set

func (Uint32Set) IsEmpty

func (s Uint32Set) IsEmpty() bool

func (Uint32Set) Minus

func (s Uint32Set) Minus(s2 Uint32Set) Uint32Set

func (Uint32Set) MinusInPlace

func (s Uint32Set) MinusInPlace(s2 Uint32Set)

func (Uint32Set) Remove

func (s Uint32Set) Remove(key uint32)

func (Uint32Set) Size

func (s Uint32Set) Size() int

func (Uint32Set) ToList

func (s Uint32Set) ToList() []uint32

func (Uint32Set) Union

func (s Uint32Set) Union(s2 Uint32Set) Uint32Set

type Uint64Set

type Uint64Set map[uint64]struct{}

func NewUint64Set

func NewUint64Set(keys ...uint64) Uint64Set

func (Uint64Set) Add

func (s Uint64Set) Add(key uint64)

func (Uint64Set) AddAll

func (s Uint64Set) AddAll(keys ...uint64)

func (Uint64Set) Contains

func (s Uint64Set) Contains(key uint64) bool

func (Uint64Set) Equal

func (s Uint64Set) Equal(s2 Uint64Set) bool

func (Uint64Set) Exist

func (s Uint64Set) Exist(key uint64) bool

func (Uint64Set) Intersect

func (s Uint64Set) Intersect(s2 Uint64Set) Uint64Set

func (Uint64Set) IsEmpty

func (s Uint64Set) IsEmpty() bool

func (Uint64Set) Minus

func (s Uint64Set) Minus(s2 Uint64Set) Uint64Set

func (Uint64Set) MinusInPlace

func (s Uint64Set) MinusInPlace(s2 Uint64Set)

func (Uint64Set) Remove

func (s Uint64Set) Remove(key uint64)

func (Uint64Set) Size

func (s Uint64Set) Size() int

func (Uint64Set) ToList

func (s Uint64Set) ToList() []uint64

func (Uint64Set) Union

func (s Uint64Set) Union(s2 Uint64Set) Uint64Set

type Uint8Set

type Uint8Set map[uint8]struct{}

func NewUint8Set

func NewUint8Set(keys ...uint8) Uint8Set

func (Uint8Set) Add

func (s Uint8Set) Add(key uint8)

func (Uint8Set) AddAll

func (s Uint8Set) AddAll(keys ...uint8)

func (Uint8Set) Contains

func (s Uint8Set) Contains(key uint8) bool

func (Uint8Set) Equal

func (s Uint8Set) Equal(s2 Uint8Set) bool

func (Uint8Set) Exist

func (s Uint8Set) Exist(key uint8) bool

func (Uint8Set) Intersect

func (s Uint8Set) Intersect(s2 Uint8Set) Uint8Set

func (Uint8Set) IsEmpty

func (s Uint8Set) IsEmpty() bool

func (Uint8Set) Minus

func (s Uint8Set) Minus(s2 Uint8Set) Uint8Set

func (Uint8Set) MinusInPlace

func (s Uint8Set) MinusInPlace(s2 Uint8Set)

func (Uint8Set) Remove

func (s Uint8Set) Remove(key uint8)

func (Uint8Set) Size

func (s Uint8Set) Size() int

func (Uint8Set) ToList

func (s Uint8Set) ToList() []uint8

func (Uint8Set) Union

func (s Uint8Set) Union(s2 Uint8Set) Uint8Set

type UintSet

type UintSet map[uint]struct{}

func NewUintSet

func NewUintSet(keys ...uint) UintSet

func (UintSet) Add

func (s UintSet) Add(key uint)

func (UintSet) AddAll

func (s UintSet) AddAll(keys ...uint)

func (UintSet) Contains

func (s UintSet) Contains(key uint) bool

func (UintSet) Equal

func (s UintSet) Equal(s2 UintSet) bool

func (UintSet) Exist

func (s UintSet) Exist(key uint) bool

func (UintSet) Intersect

func (s UintSet) Intersect(s2 UintSet) UintSet

func (UintSet) IsEmpty

func (s UintSet) IsEmpty() bool

func (UintSet) Minus

func (s UintSet) Minus(s2 UintSet) UintSet

func (UintSet) MinusInPlace

func (s UintSet) MinusInPlace(s2 UintSet)

func (UintSet) Remove

func (s UintSet) Remove(key uint)

func (UintSet) Size

func (s UintSet) Size() int

func (UintSet) ToList

func (s UintSet) ToList() []uint

func (UintSet) Union

func (s UintSet) Union(s2 UintSet) UintSet

Jump to

Keyboard shortcuts

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