Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Minimal IntervalSet type #193
Minimal IntervalSet type #193
Changes from 26 commits
573ebe9
e122bfe
a680299
707c7bf
abaddf2
8231eeb
4cadfe2
20b0c20
9af3a28
f4386ed
df2d9db
3503f74
fc5dea1
bcffe82
7f8017d
e077615
3ec4910
fe6bb91
f8a9a90
525e59f
5453749
c170ffc
99b5c6e
c338239
a011e00
1a57132
ca36a29
40aa82b
212469e
376484a
e891f30
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't looked through the package, dunno if this is standardized in it? If not,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
≥
is pretty common in this package as it uses a lot of unicode characters.https://github.com/invenia/Intervals.jl/blob/master/src/interval.jl#L76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this mean that if x doesn't have the same concrete type as the element type of y it will throw a method error? I think
issubset(2, [1.0..3.0, 4.0..5.0])
should betrue
not a method error.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In either case we should probably add a test for this case (around line 50 of
tests/sets.jl
), either to verify the method error, or check that it works.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. One thing I also noticed is that we aren't testing things like
issubset(interval, intervals)
andissubset(intervals, interval)
which would fallback to calling the basesetdiff
and erroring. I'll go through and add more tests for the other set operations in case there are other incorrect fallback conditions.