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

Specified behaviour of Subset.covers() for different dimensionality #1637

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

philip-paul-mueller
Copy link
Collaborator

Before all cover functions ignored the case if the subsets have different lengths. The effect was that the subsets A = Range.from_string("i, k, 0:N, 1") and B = Range.from_string("i, k") would cover each other. This case was considered undefined behaviour.

This commit changes the behaviour of these function such that for covering it is required that the subsets must have the same dimensions.

Before all cover functions ignored the case if the subsets have different lengths.
The effect was that the subsets `A = Range.from_string("i, k, 0:N, 1")` and `B = Range.from_string("i, k")` would cover each other.
This case was considered undefined behaviour.

This commit changes the behaviour of these function such that for covering it is required that the subsets must have the same dimensions.
Copy link
Collaborator

@tbennun tbennun left a comment

Choose a reason for hiding this comment

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

Please change error message to reflect issue. Otherwise looks good

Thanks for your suggestions.

Co-authored-by: Tal Ben-Nun <tbennun@users.noreply.github.com>
@tbennun tbennun enabled auto-merge September 4, 2024 18:07
@tbennun tbennun added this pull request to the merge queue Sep 4, 2024
Merged via the queue into spcl:master with commit e1daf32 Sep 4, 2024
10 checks passed
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.

2 participants