Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sets: add Union() #158

Merged
merged 2 commits into from
Sep 25, 2024
Merged

sets: add Union() #158

merged 2 commits into from
Sep 25, 2024

Conversation

marco-m-pix4d
Copy link
Contributor

This is needed for the facchino tags preview.

PCI-3992

@marco-m-pix4d marco-m-pix4d requested a review from a team as a code owner September 25, 2024 08:43
@marco-m-pix4d marco-m-pix4d requested review from odormond, iAmoric, SpectreVert and aliculPix4D and removed request for a team September 25, 2024 08:43
@@ -105,3 +105,15 @@ func (s *Set[T]) Intersection(x *Set[T]) *Set[T] {
}
return result
}

// Union returns a set containing all the elements of s and x.
func (s *Set[T]) Union(x *Set[T]) *Set[T] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you also need the set difference as you wrote in chat? or we already have that...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah we have it...
func (s *Set[T]) Difference(x *Set[T]) *Set[T]

Base automatically changed from fix-github-tests to master September 25, 2024 09:04
@marco-m-pix4d marco-m-pix4d merged commit a55a812 into master Sep 25, 2024
1 check passed
@marco-m-pix4d marco-m-pix4d deleted the sets-union branch September 25, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants