-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add decorated intervals #112
Conversation
Also, the documentation is missing... |
Great work, thanks! Let me look through it carefully. |
As you'll see, it is heavily based on yours, extending it whenever was needed. |
It's pretty amazing that the ITF1788 tests pass! Really nice work extending what I had done. Since all the tests pass, maybe we should just merge this and then iterate on it? Or what else do you think needs to be done? |
|
||
for f in other_functions | ||
@eval $(f){T}(xx::DecoratedInterval{T}, yy::DecoratedInterval{T}) = | ||
DecoratedInterval($(f)(interval(xx), interval(yy)), trv) |
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 don't think just putting trv
is correct. Shouldn't it be the decay
of the others? Maybe not for hull
(which is sort of a discontinous operation), but for the others (which seem to be in some sense "continuous" operations). Or is this discussed in the Standard?
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.
It is discussed in the standard; there, it is recommended that the user adapts it by changing the decoration. I'll add this (and other) docstrings explaining this.
Current coverage is 93.43%@@ master #112 diff @@
========================================
Files 16 18 +2
Lines 689 853 +164
Methods 0 0
Branches 0 0
========================================
+ Hits 651 797 +146
- Misses 38 56 +18
Partials 0 0
|
|
||
function DecoratedInterval(I::Interval, d::DECORATION) | ||
dd = decoration(I) | ||
Int(dd) < 2 && return new(I, dd) |
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.
Use symbolic values here, not numeric: dd <= trv
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'll implement it as you suggest.
I've just pushed a new commit following your suggestion; it includes some docstrings. (I hope to push a new one with more docstrings; just give me a few days.) |
Incidentally, can you take a look on |
Also, other tests should be added, covering decorated intervals with extended precision. |
I think we should merge this now. |
Fine with me. |
Also remove isinside from exported functions, since it does not exist
These include cancleplus, cancelminus, intersect, hull, min, max, abs, discontinuos functions (sign, ceil, floor, trunc, round) and the functions with restricted domain.
Erase `export decay`, which I used for debugging
It only includes some docstrings (following the recomended syntax).
d073a37
to
d0707a8
Compare
Current coverage is 92.99%@@ master #112 diff @@
==========================================
Files 15 18 +3
Lines 685 856 +171
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 647 796 +149
- Misses 38 60 +22
Partials 0 0 |
This PR implements the decoration system, and it is tested against the ITF1788 suite. (The tests with Julia 0.5 were hanging locally on my machine.) I needed to rebase from the branch "decorations" to include a bunch of changes (since version 0.2). Still missing is to extend our own tests. I think this PR is ready for reviewing and corrections.