sets

package
v1.8.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeInt32 added in v1.3.0

func MergeInt32(dst, src sets.Int32) sets.Int32

MergeInt32 merges the src sets into dst and returns dst. This assumes that dst is non-nil. For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} MergeInt32(s1, s2) = {a1, a2, a3, a4, a5} s1 = {a1, a2, a3, a4, a5}

It supersedes s1.Union(s2) when constructing a new set is not the intention.

func MergeString added in v1.3.0

func MergeString(dst, src sets.String) sets.String

MergeString merges the src sets into dst and returns dst. This assumes that dst is non-nil. For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} MergeString(s1, s2) = {a1, a2, a3, a4, a5} s1 = {a1, a2, a3, a4, a5}

It supersedes s1.Union(s2) when constructing a new set is not the intention.

func SymmetricDifferenceString added in v1.3.0

func SymmetricDifferenceString(s1, s2 sets.String) sets.String

SymmetricDifferenceString returns the symmetric difference of two sets. For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} SymmetricDifferenceString(s1, s2) = {a3, a4, a5}

It supersedes s1.Difference(s2).Union(s2.Difference(s1)) which is a little complicated and always builds several unnecessary intermediate sets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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