func (a TagSet) Intersection(b TagSet) TagSet {
	aSet := a.ToSet()
	bSet := b.ToSet()
	cSet := aSet.Intersection(bSet)
	return setToTagSet(cSet)
}
Intersection is a set operation.
package inventory
import (
	"sigs.k8s.io/promo-tools/v3/legacy/container"
)
func (a RegInvImageDigest) Minus(b RegInvImageDigest) RegInvImageDigest {
	aSet := a.ToSet()
	bSet := b.ToSet()
	cSet := aSet.Minus(bSet)
	return setToRegInvImageDigest(cSet)
}
func (a RegInvImageDigest) Intersection(b RegInvImageDigest) RegInvImageDigest {
	aSet := a.ToSet()
	bSet := b.ToSet()
	cSet := aSet.Intersection(bSet)
	return setToRegInvImageDigest(cSet)
}
func (a RegInvImageDigest) ToSet() container.Set {
	b := make(container.Set)
	for k, v := range a {
		b[k] = v
	}
	return b
}
func setToRegInvImageDigest(a container.Set) RegInvImageDigest {
	b := make(RegInvImageDigest)
	for k, v := range a {
		b[k.(ImageDigest)] = v.(TagSlice)
	}
	return b
}
func (a RegInvFlat) ToSet() container.Set {
	b := make(container.Set)
	for k, v := range a {
		b[k] = v
	}
	return b
}
func (a RegInvImageTag) Minus(b RegInvImageTag) RegInvImageTag {
	aSet := a.ToSet()
	bSet := b.ToSet()
	cSet := aSet.Minus(bSet)
	return setToRegInvImageTag(cSet)
}
func (a RegInvImageTag) Intersection(b RegInvImageTag) RegInvImageTag {
	aSet := a.ToSet()
	bSet := b.ToSet()
	cSet := aSet.Intersection(bSet)
	return setToRegInvImageTag(cSet)
}
func (a RegInvImageTag) ToSet() container.Set {
	b := make(container.Set)
	for k, v := range a {
		b[k] = v
	}
	return b
}
func setToRegInvImageTag(a container.Set) RegInvImageTag {
	b := make(RegInvImageTag)
	for k, v := range a {
		b[k.(ImageTag)] = v.(Digest)
	}
	return b
}
func (a RegInvImage) ToSet() container.Set {
	b := make(container.Set)
	for k, v := range a {
		b[k] = v
	}
	return b
}
func toRegistryInventory(a container.Set) RegInvImage {
	b := make(RegInvImage)
	for k, v := range a {
		b[k.(ImageName)] = v.(DigestTags)
	}
	return b
}
func (a RegInvImage) Minus(b RegInvImage) RegInvImage {
	aSet := a.ToSet()
	bSet := b.ToSet()
	cSet := aSet.Minus(bSet)
	return toRegistryInventory(cSet)
}
func (a RegInvImage) Union(b RegInvImage) RegInvImage {
	aSet := a.ToSet()
	bSet := b.ToSet()
	cSet := aSet.Union(bSet)
	return toRegistryInventory(cSet)
}
func (a TagSlice) ToTagSet() TagSet {
	b := make(TagSet)
	for _, t := range a {
		b[t] = nil
	}
	return b
}
func (a TagSlice) Minus(b TagSlice) TagSet {
	aSet := a.ToTagSet()
	bSet := b.ToTagSet()
	cSet := aSet.Minus(bSet)
	return cSet
}
func (a TagSlice) Union(b TagSlice) TagSet {
	aSet := a.ToTagSet()
	bSet := b.ToTagSet()
	cSet := aSet.Union(bSet)
	return cSet
}
func (a TagSlice) Intersection(b TagSlice) TagSet {
	aSet := a.ToTagSet()
	bSet := b.ToTagSet()
	cSet := aSet.Intersection(bSet)
	return cSet
}
func (a TagSet) ToSet() container.Set {
	b := make(container.Set)
	for t := range a {
		b[t] = nil
	}
	return b
}
func setToTagSet(a container.Set) TagSet {
	b := make(TagSet)
	for k := range a {
		b[k.(Tag)] = nil
	}
	return b
}
func (a TagSet) Minus(b TagSet) TagSet {
	aSet := a.ToSet()
	bSet := b.ToSet()
	cSet := aSet.Minus(bSet)
	return setToTagSet(cSet)
}
func (a TagSet) Union(b TagSet) TagSet {
	aSet := a.ToSet()
	bSet := b.ToSet()
	cSet := aSet.Union(bSet)
	return setToTagSet(cSet)
}