-
Notifications
You must be signed in to change notification settings - Fork 53
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
Extend evaluate on AbstractArray, instead of Array #167
Conversation
src/evaluate.jl
Outdated
@@ -264,6 +264,10 @@ function evaluate(a::TaylorN{T}, vals::NTuple{N,S}) where | |||
return sum( sort!(suma, by=abs2) ) | |||
end | |||
|
|||
# This should allow to evaluate IntervalBoxes appropriately | |||
evaluate(a::TaylorN{T}, vals::AbstractArray) where |
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.
After JuliaIntervals/IntervalArithmetic.jl#152, IntervalBox
will no longer be an AbstractArray
.
However, as far as I can see, there's no reason to restrict this to AbstractArray
-- you don't need to type annotate vals
at all.
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.
Thanks a lot! Good catch! I'll try your suggestion.
Thanks again for the suggestion. |
Now that I think about it, it would be best to avoid the splat ( |
Thanks for the suggestion. I think it is worth considering it, though I am not sure how. The original evaluate function (for |
To be honest I just have the general idea that "splatting is slow", but I guess it would require actual benchmarks to check that. Let's just leave it for now. |
Agree, let's leave it for now. |
Do you agree to go ahead and merge this? |
This allows for evaluations using
IntervalBoxes
.