set

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: BSD-3-Clause Imports: 0 Imported by: 57

Documentation

Overview

Package set implements utility functions for manipulating sets of primitive type elements represented as maps.

For each primitive type "foo", the package provides global variables Foo and FooBool that implement utility functions for map[foo]struct{} and map[foo]bool respectively. For each such variable, the package provides:

  1. methods for conversion between sets represented as maps and slices: FromSlice(slice) and ToSlice(set)

  2. methods for common set operations: Difference(s1, s2), Intersection(s1, s2), and Union(s1, s2); note that these functions store their result in the first argument

For instance, one can use these functions as follows:

s1 := set.String.FromSlice([]string{"a", "b"})
s2 := set.String.FromSlice([]string{"b", "c"})

set.String.Difference(s1, s2)   // s1 == {"a"}
set.String.Intersection(s1, s2) // s1 == {}
set.String.Union(s1, s2)        // s1 == {"b", "c"}

Index

Constants

This section is empty.

Variables

View Source
var Complex128 = Complex128T{}
View Source
var Complex128Bool = Complex128BoolT{}
View Source
var Complex64 = Complex64T{}
View Source
var Complex64Bool = Complex64BoolT{}
View Source
var Float32 = Float32T{}
View Source
var Float32Bool = Float32BoolT{}
View Source
var Float64 = Float64T{}
View Source
var Float64Bool = Float64BoolT{}
View Source
var Int = IntT{}
View Source
var Int16 = Int16T{}
View Source
var Int16Bool = Int16BoolT{}
View Source
var Int32 = Int32T{}
View Source
var Int32Bool = Int32BoolT{}
View Source
var Int64 = Int64T{}
View Source
var Int64Bool = Int64BoolT{}
View Source
var Int8 = Int8T{}
View Source
var Int8Bool = Int8BoolT{}
View Source
var IntBool = IntBoolT{}
View Source
var String = StringT{}
View Source
var StringBool = StringBoolT{}
View Source
var Uint = UintT{}
View Source
var Uint16 = Uint16T{}
View Source
var Uint16Bool = Uint16BoolT{}
View Source
var Uint32 = Uint32T{}
View Source
var Uint32Bool = Uint32BoolT{}
View Source
var Uint64 = Uint64T{}
View Source
var Uint64Bool = Uint64BoolT{}
View Source
var Uint8 = Uint8T{}
View Source
var Uint8Bool = Uint8BoolT{}
View Source
var UintBool = UintBoolT{}
View Source
var Uintptr = UintptrT{}
View Source
var UintptrBool = UintptrBoolT{}

Functions

This section is empty.

Types

type Complex128BoolT

type Complex128BoolT struct{}

func (Complex128BoolT) Difference

func (Complex128BoolT) Difference(s1, s2 map[complex128]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Complex128BoolT) FromSlice

func (Complex128BoolT) FromSlice(els []complex128) map[complex128]bool

FromSlice transforms the given slice to a set.

func (Complex128BoolT) Intersection

func (Complex128BoolT) Intersection(s1, s2 map[complex128]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Complex128BoolT) ToSlice

func (Complex128BoolT) ToSlice(s map[complex128]bool) []complex128

ToSlice transforms the given set to a slice.

func (Complex128BoolT) Union

func (Complex128BoolT) Union(s1, s2 map[complex128]bool)

Union merges s1 and s2, storing the result in s1.

type Complex128T

type Complex128T struct{}

func (Complex128T) Difference

func (Complex128T) Difference(s1, s2 map[complex128]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Complex128T) FromSlice

func (Complex128T) FromSlice(els []complex128) map[complex128]struct{}

FromSlice transforms the given slice to a set.

func (Complex128T) Intersection

func (Complex128T) Intersection(s1, s2 map[complex128]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Complex128T) ToSlice

func (Complex128T) ToSlice(s map[complex128]struct{}) []complex128

ToSlice transforms the given set to a slice.

func (Complex128T) Union

func (Complex128T) Union(s1, s2 map[complex128]struct{})

Union merges s1 and s2, storing the result in s1.

type Complex64BoolT

type Complex64BoolT struct{}

func (Complex64BoolT) Difference

func (Complex64BoolT) Difference(s1, s2 map[complex64]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Complex64BoolT) FromSlice

func (Complex64BoolT) FromSlice(els []complex64) map[complex64]bool

FromSlice transforms the given slice to a set.

func (Complex64BoolT) Intersection

func (Complex64BoolT) Intersection(s1, s2 map[complex64]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Complex64BoolT) ToSlice

func (Complex64BoolT) ToSlice(s map[complex64]bool) []complex64

ToSlice transforms the given set to a slice.

func (Complex64BoolT) Union

func (Complex64BoolT) Union(s1, s2 map[complex64]bool)

Union merges s1 and s2, storing the result in s1.

type Complex64T

type Complex64T struct{}

func (Complex64T) Difference

func (Complex64T) Difference(s1, s2 map[complex64]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Complex64T) FromSlice

func (Complex64T) FromSlice(els []complex64) map[complex64]struct{}

FromSlice transforms the given slice to a set.

func (Complex64T) Intersection

func (Complex64T) Intersection(s1, s2 map[complex64]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Complex64T) ToSlice

func (Complex64T) ToSlice(s map[complex64]struct{}) []complex64

ToSlice transforms the given set to a slice.

func (Complex64T) Union

func (Complex64T) Union(s1, s2 map[complex64]struct{})

Union merges s1 and s2, storing the result in s1.

type Float32BoolT

type Float32BoolT struct{}

func (Float32BoolT) Difference

func (Float32BoolT) Difference(s1, s2 map[float32]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Float32BoolT) FromSlice

func (Float32BoolT) FromSlice(els []float32) map[float32]bool

FromSlice transforms the given slice to a set.

func (Float32BoolT) Intersection

func (Float32BoolT) Intersection(s1, s2 map[float32]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Float32BoolT) ToSlice

func (Float32BoolT) ToSlice(s map[float32]bool) []float32

ToSlice transforms the given set to a slice.

func (Float32BoolT) Union

func (Float32BoolT) Union(s1, s2 map[float32]bool)

Union merges s1 and s2, storing the result in s1.

type Float32T

type Float32T struct{}

func (Float32T) Difference

func (Float32T) Difference(s1, s2 map[float32]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Float32T) FromSlice

func (Float32T) FromSlice(els []float32) map[float32]struct{}

FromSlice transforms the given slice to a set.

func (Float32T) Intersection

func (Float32T) Intersection(s1, s2 map[float32]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Float32T) ToSlice

func (Float32T) ToSlice(s map[float32]struct{}) []float32

ToSlice transforms the given set to a slice.

func (Float32T) Union

func (Float32T) Union(s1, s2 map[float32]struct{})

Union merges s1 and s2, storing the result in s1.

type Float64BoolT

type Float64BoolT struct{}

func (Float64BoolT) Difference

func (Float64BoolT) Difference(s1, s2 map[float64]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Float64BoolT) FromSlice

func (Float64BoolT) FromSlice(els []float64) map[float64]bool

FromSlice transforms the given slice to a set.

func (Float64BoolT) Intersection

func (Float64BoolT) Intersection(s1, s2 map[float64]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Float64BoolT) ToSlice

func (Float64BoolT) ToSlice(s map[float64]bool) []float64

ToSlice transforms the given set to a slice.

func (Float64BoolT) Union

func (Float64BoolT) Union(s1, s2 map[float64]bool)

Union merges s1 and s2, storing the result in s1.

type Float64T

type Float64T struct{}

func (Float64T) Difference

func (Float64T) Difference(s1, s2 map[float64]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Float64T) FromSlice

func (Float64T) FromSlice(els []float64) map[float64]struct{}

FromSlice transforms the given slice to a set.

func (Float64T) Intersection

func (Float64T) Intersection(s1, s2 map[float64]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Float64T) ToSlice

func (Float64T) ToSlice(s map[float64]struct{}) []float64

ToSlice transforms the given set to a slice.

func (Float64T) Union

func (Float64T) Union(s1, s2 map[float64]struct{})

Union merges s1 and s2, storing the result in s1.

type Int16BoolT

type Int16BoolT struct{}

func (Int16BoolT) Difference

func (Int16BoolT) Difference(s1, s2 map[int16]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Int16BoolT) FromSlice

func (Int16BoolT) FromSlice(els []int16) map[int16]bool

FromSlice transforms the given slice to a set.

func (Int16BoolT) Intersection

func (Int16BoolT) Intersection(s1, s2 map[int16]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Int16BoolT) ToSlice

func (Int16BoolT) ToSlice(s map[int16]bool) []int16

ToSlice transforms the given set to a slice.

func (Int16BoolT) Union

func (Int16BoolT) Union(s1, s2 map[int16]bool)

Union merges s1 and s2, storing the result in s1.

type Int16T

type Int16T struct{}

func (Int16T) Difference

func (Int16T) Difference(s1, s2 map[int16]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Int16T) FromSlice

func (Int16T) FromSlice(els []int16) map[int16]struct{}

FromSlice transforms the given slice to a set.

func (Int16T) Intersection

func (Int16T) Intersection(s1, s2 map[int16]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Int16T) ToSlice

func (Int16T) ToSlice(s map[int16]struct{}) []int16

ToSlice transforms the given set to a slice.

func (Int16T) Union

func (Int16T) Union(s1, s2 map[int16]struct{})

Union merges s1 and s2, storing the result in s1.

type Int32BoolT

type Int32BoolT struct{}

func (Int32BoolT) Difference

func (Int32BoolT) Difference(s1, s2 map[int32]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Int32BoolT) FromSlice

func (Int32BoolT) FromSlice(els []int32) map[int32]bool

FromSlice transforms the given slice to a set.

func (Int32BoolT) Intersection

func (Int32BoolT) Intersection(s1, s2 map[int32]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Int32BoolT) ToSlice

func (Int32BoolT) ToSlice(s map[int32]bool) []int32

ToSlice transforms the given set to a slice.

func (Int32BoolT) Union

func (Int32BoolT) Union(s1, s2 map[int32]bool)

Union merges s1 and s2, storing the result in s1.

type Int32T

type Int32T struct{}

func (Int32T) Difference

func (Int32T) Difference(s1, s2 map[int32]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Int32T) FromSlice

func (Int32T) FromSlice(els []int32) map[int32]struct{}

FromSlice transforms the given slice to a set.

func (Int32T) Intersection

func (Int32T) Intersection(s1, s2 map[int32]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Int32T) ToSlice

func (Int32T) ToSlice(s map[int32]struct{}) []int32

ToSlice transforms the given set to a slice.

func (Int32T) Union

func (Int32T) Union(s1, s2 map[int32]struct{})

Union merges s1 and s2, storing the result in s1.

type Int64BoolT

type Int64BoolT struct{}

func (Int64BoolT) Difference

func (Int64BoolT) Difference(s1, s2 map[int64]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Int64BoolT) FromSlice

func (Int64BoolT) FromSlice(els []int64) map[int64]bool

FromSlice transforms the given slice to a set.

func (Int64BoolT) Intersection

func (Int64BoolT) Intersection(s1, s2 map[int64]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Int64BoolT) ToSlice

func (Int64BoolT) ToSlice(s map[int64]bool) []int64

ToSlice transforms the given set to a slice.

func (Int64BoolT) Union

func (Int64BoolT) Union(s1, s2 map[int64]bool)

Union merges s1 and s2, storing the result in s1.

type Int64T

type Int64T struct{}

func (Int64T) Difference

func (Int64T) Difference(s1, s2 map[int64]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Int64T) FromSlice

func (Int64T) FromSlice(els []int64) map[int64]struct{}

FromSlice transforms the given slice to a set.

func (Int64T) Intersection

func (Int64T) Intersection(s1, s2 map[int64]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Int64T) ToSlice

func (Int64T) ToSlice(s map[int64]struct{}) []int64

ToSlice transforms the given set to a slice.

func (Int64T) Union

func (Int64T) Union(s1, s2 map[int64]struct{})

Union merges s1 and s2, storing the result in s1.

type Int8BoolT

type Int8BoolT struct{}

func (Int8BoolT) Difference

func (Int8BoolT) Difference(s1, s2 map[int8]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Int8BoolT) FromSlice

func (Int8BoolT) FromSlice(els []int8) map[int8]bool

FromSlice transforms the given slice to a set.

func (Int8BoolT) Intersection

func (Int8BoolT) Intersection(s1, s2 map[int8]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Int8BoolT) ToSlice

func (Int8BoolT) ToSlice(s map[int8]bool) []int8

ToSlice transforms the given set to a slice.

func (Int8BoolT) Union

func (Int8BoolT) Union(s1, s2 map[int8]bool)

Union merges s1 and s2, storing the result in s1.

type Int8T

type Int8T struct{}

func (Int8T) Difference

func (Int8T) Difference(s1, s2 map[int8]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Int8T) FromSlice

func (Int8T) FromSlice(els []int8) map[int8]struct{}

FromSlice transforms the given slice to a set.

func (Int8T) Intersection

func (Int8T) Intersection(s1, s2 map[int8]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Int8T) ToSlice

func (Int8T) ToSlice(s map[int8]struct{}) []int8

ToSlice transforms the given set to a slice.

func (Int8T) Union

func (Int8T) Union(s1, s2 map[int8]struct{})

Union merges s1 and s2, storing the result in s1.

type IntBoolT

type IntBoolT struct{}

func (IntBoolT) Difference

func (IntBoolT) Difference(s1, s2 map[int]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (IntBoolT) FromSlice

func (IntBoolT) FromSlice(els []int) map[int]bool

FromSlice transforms the given slice to a set.

func (IntBoolT) Intersection

func (IntBoolT) Intersection(s1, s2 map[int]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (IntBoolT) ToSlice

func (IntBoolT) ToSlice(s map[int]bool) []int

ToSlice transforms the given set to a slice.

func (IntBoolT) Union

func (IntBoolT) Union(s1, s2 map[int]bool)

Union merges s1 and s2, storing the result in s1.

type IntT

type IntT struct{}

func (IntT) Difference

func (IntT) Difference(s1, s2 map[int]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (IntT) FromSlice

func (IntT) FromSlice(els []int) map[int]struct{}

FromSlice transforms the given slice to a set.

func (IntT) Intersection

func (IntT) Intersection(s1, s2 map[int]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (IntT) ToSlice

func (IntT) ToSlice(s map[int]struct{}) []int

ToSlice transforms the given set to a slice.

func (IntT) Union

func (IntT) Union(s1, s2 map[int]struct{})

Union merges s1 and s2, storing the result in s1.

type StringBoolT

type StringBoolT struct{}

func (StringBoolT) Difference

func (StringBoolT) Difference(s1, s2 map[string]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (StringBoolT) FromSlice

func (StringBoolT) FromSlice(els []string) map[string]bool

FromSlice transforms the given slice to a set.

func (StringBoolT) Intersection

func (StringBoolT) Intersection(s1, s2 map[string]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (StringBoolT) ToSlice

func (StringBoolT) ToSlice(s map[string]bool) []string

ToSlice transforms the given set to a slice.

func (StringBoolT) Union

func (StringBoolT) Union(s1, s2 map[string]bool)

Union merges s1 and s2, storing the result in s1.

type StringT

type StringT struct{}

func (StringT) Difference

func (StringT) Difference(s1, s2 map[string]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (StringT) FromSlice

func (StringT) FromSlice(els []string) map[string]struct{}

FromSlice transforms the given slice to a set.

func (StringT) Intersection

func (StringT) Intersection(s1, s2 map[string]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (StringT) ToSlice

func (StringT) ToSlice(s map[string]struct{}) []string

ToSlice transforms the given set to a slice.

func (StringT) Union

func (StringT) Union(s1, s2 map[string]struct{})

Union merges s1 and s2, storing the result in s1.

type Uint16BoolT

type Uint16BoolT struct{}

func (Uint16BoolT) Difference

func (Uint16BoolT) Difference(s1, s2 map[uint16]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Uint16BoolT) FromSlice

func (Uint16BoolT) FromSlice(els []uint16) map[uint16]bool

FromSlice transforms the given slice to a set.

func (Uint16BoolT) Intersection

func (Uint16BoolT) Intersection(s1, s2 map[uint16]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Uint16BoolT) ToSlice

func (Uint16BoolT) ToSlice(s map[uint16]bool) []uint16

ToSlice transforms the given set to a slice.

func (Uint16BoolT) Union

func (Uint16BoolT) Union(s1, s2 map[uint16]bool)

Union merges s1 and s2, storing the result in s1.

type Uint16T

type Uint16T struct{}

func (Uint16T) Difference

func (Uint16T) Difference(s1, s2 map[uint16]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Uint16T) FromSlice

func (Uint16T) FromSlice(els []uint16) map[uint16]struct{}

FromSlice transforms the given slice to a set.

func (Uint16T) Intersection

func (Uint16T) Intersection(s1, s2 map[uint16]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Uint16T) ToSlice

func (Uint16T) ToSlice(s map[uint16]struct{}) []uint16

ToSlice transforms the given set to a slice.

func (Uint16T) Union

func (Uint16T) Union(s1, s2 map[uint16]struct{})

Union merges s1 and s2, storing the result in s1.

type Uint32BoolT

type Uint32BoolT struct{}

func (Uint32BoolT) Difference

func (Uint32BoolT) Difference(s1, s2 map[uint32]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Uint32BoolT) FromSlice

func (Uint32BoolT) FromSlice(els []uint32) map[uint32]bool

FromSlice transforms the given slice to a set.

func (Uint32BoolT) Intersection

func (Uint32BoolT) Intersection(s1, s2 map[uint32]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Uint32BoolT) ToSlice

func (Uint32BoolT) ToSlice(s map[uint32]bool) []uint32

ToSlice transforms the given set to a slice.

func (Uint32BoolT) Union

func (Uint32BoolT) Union(s1, s2 map[uint32]bool)

Union merges s1 and s2, storing the result in s1.

type Uint32T

type Uint32T struct{}

func (Uint32T) Difference

func (Uint32T) Difference(s1, s2 map[uint32]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Uint32T) FromSlice

func (Uint32T) FromSlice(els []uint32) map[uint32]struct{}

FromSlice transforms the given slice to a set.

func (Uint32T) Intersection

func (Uint32T) Intersection(s1, s2 map[uint32]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Uint32T) ToSlice

func (Uint32T) ToSlice(s map[uint32]struct{}) []uint32

ToSlice transforms the given set to a slice.

func (Uint32T) Union

func (Uint32T) Union(s1, s2 map[uint32]struct{})

Union merges s1 and s2, storing the result in s1.

type Uint64BoolT

type Uint64BoolT struct{}

func (Uint64BoolT) Difference

func (Uint64BoolT) Difference(s1, s2 map[uint64]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Uint64BoolT) FromSlice

func (Uint64BoolT) FromSlice(els []uint64) map[uint64]bool

FromSlice transforms the given slice to a set.

func (Uint64BoolT) Intersection

func (Uint64BoolT) Intersection(s1, s2 map[uint64]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Uint64BoolT) ToSlice

func (Uint64BoolT) ToSlice(s map[uint64]bool) []uint64

ToSlice transforms the given set to a slice.

func (Uint64BoolT) Union

func (Uint64BoolT) Union(s1, s2 map[uint64]bool)

Union merges s1 and s2, storing the result in s1.

type Uint64T

type Uint64T struct{}

func (Uint64T) Difference

func (Uint64T) Difference(s1, s2 map[uint64]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Uint64T) FromSlice

func (Uint64T) FromSlice(els []uint64) map[uint64]struct{}

FromSlice transforms the given slice to a set.

func (Uint64T) Intersection

func (Uint64T) Intersection(s1, s2 map[uint64]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Uint64T) ToSlice

func (Uint64T) ToSlice(s map[uint64]struct{}) []uint64

ToSlice transforms the given set to a slice.

func (Uint64T) Union

func (Uint64T) Union(s1, s2 map[uint64]struct{})

Union merges s1 and s2, storing the result in s1.

type Uint8BoolT

type Uint8BoolT struct{}

func (Uint8BoolT) Difference

func (Uint8BoolT) Difference(s1, s2 map[uint8]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (Uint8BoolT) FromSlice

func (Uint8BoolT) FromSlice(els []uint8) map[uint8]bool

FromSlice transforms the given slice to a set.

func (Uint8BoolT) Intersection

func (Uint8BoolT) Intersection(s1, s2 map[uint8]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (Uint8BoolT) ToSlice

func (Uint8BoolT) ToSlice(s map[uint8]bool) []uint8

ToSlice transforms the given set to a slice.

func (Uint8BoolT) Union

func (Uint8BoolT) Union(s1, s2 map[uint8]bool)

Union merges s1 and s2, storing the result in s1.

type Uint8T

type Uint8T struct{}

func (Uint8T) Difference

func (Uint8T) Difference(s1, s2 map[uint8]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (Uint8T) FromSlice

func (Uint8T) FromSlice(els []uint8) map[uint8]struct{}

FromSlice transforms the given slice to a set.

func (Uint8T) Intersection

func (Uint8T) Intersection(s1, s2 map[uint8]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (Uint8T) ToSlice

func (Uint8T) ToSlice(s map[uint8]struct{}) []uint8

ToSlice transforms the given set to a slice.

func (Uint8T) Union

func (Uint8T) Union(s1, s2 map[uint8]struct{})

Union merges s1 and s2, storing the result in s1.

type UintBoolT

type UintBoolT struct{}

func (UintBoolT) Difference

func (UintBoolT) Difference(s1, s2 map[uint]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (UintBoolT) FromSlice

func (UintBoolT) FromSlice(els []uint) map[uint]bool

FromSlice transforms the given slice to a set.

func (UintBoolT) Intersection

func (UintBoolT) Intersection(s1, s2 map[uint]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (UintBoolT) ToSlice

func (UintBoolT) ToSlice(s map[uint]bool) []uint

ToSlice transforms the given set to a slice.

func (UintBoolT) Union

func (UintBoolT) Union(s1, s2 map[uint]bool)

Union merges s1 and s2, storing the result in s1.

type UintT

type UintT struct{}

func (UintT) Difference

func (UintT) Difference(s1, s2 map[uint]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (UintT) FromSlice

func (UintT) FromSlice(els []uint) map[uint]struct{}

FromSlice transforms the given slice to a set.

func (UintT) Intersection

func (UintT) Intersection(s1, s2 map[uint]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (UintT) ToSlice

func (UintT) ToSlice(s map[uint]struct{}) []uint

ToSlice transforms the given set to a slice.

func (UintT) Union

func (UintT) Union(s1, s2 map[uint]struct{})

Union merges s1 and s2, storing the result in s1.

type UintptrBoolT

type UintptrBoolT struct{}

func (UintptrBoolT) Difference

func (UintptrBoolT) Difference(s1, s2 map[uintptr]bool)

Difference subtracts s2 from s1, storing the result in s1.

func (UintptrBoolT) FromSlice

func (UintptrBoolT) FromSlice(els []uintptr) map[uintptr]bool

FromSlice transforms the given slice to a set.

func (UintptrBoolT) Intersection

func (UintptrBoolT) Intersection(s1, s2 map[uintptr]bool)

Intersection intersects s1 and s2, storing the result in s1.

func (UintptrBoolT) ToSlice

func (UintptrBoolT) ToSlice(s map[uintptr]bool) []uintptr

ToSlice transforms the given set to a slice.

func (UintptrBoolT) Union

func (UintptrBoolT) Union(s1, s2 map[uintptr]bool)

Union merges s1 and s2, storing the result in s1.

type UintptrT

type UintptrT struct{}

func (UintptrT) Difference

func (UintptrT) Difference(s1, s2 map[uintptr]struct{})

Difference subtracts s2 from s1, storing the result in s1.

func (UintptrT) FromSlice

func (UintptrT) FromSlice(els []uintptr) map[uintptr]struct{}

FromSlice transforms the given slice to a set.

func (UintptrT) Intersection

func (UintptrT) Intersection(s1, s2 map[uintptr]struct{})

Intersection intersects s1 and s2, storing the result in s1.

func (UintptrT) ToSlice

func (UintptrT) ToSlice(s map[uintptr]struct{}) []uintptr

ToSlice transforms the given set to a slice.

func (UintptrT) Union

func (UintptrT) Union(s1, s2 map[uintptr]struct{})

Union merges s1 and s2, storing the result in s1.

Jump to

Keyboard shortcuts

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