sets

package
v1.2.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

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

Merge 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} Merge(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 SymmetricDifference

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

SymmetricDifference returns the symmetric difference of two sets. For example: s1 = {a1, a2, a3} s2 = {a1, a2, a4, a5} SymmetricDifference(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