MCPcopy
hub / github.com/cortexlabs/cortex / Difference

Function Difference

pkg/lib/sets/strset/strset.go:283–289  ·  view source on GitHub ↗

Difference returns a new set which contains items which are in the first set but not in the others.

(set1 Set, sets ...Set)

Source from the content-addressed store, hash-verified

281// Difference returns a new set which contains items which are in the first
282// set but not in the others.
283func Difference(set1 Set, sets ...Set) Set {
284 s := set1.Copy()
285 for _, set := range sets {
286 s.Subtract(set)
287 }
288 return s
289}
290
291// Intersection returns a new set which contains items that only exist in all
292// given sets.

Callers 4

TestDifferenceFunction · 0.92
ManageJobResourcesFunction · 0.92
SymmetricDifferenceFunction · 0.70

Calls 2

CopyMethod · 0.45
SubtractMethod · 0.45

Tested by 1

TestDifferenceFunction · 0.74