[ 
https://issues.apache.org/jira/browse/MATH-989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13675953#comment-13675953
 ] 

Gilles commented on MATH-989:
-----------------------------

bq. but wouldn't it require redundant storage of limits, when the class stores 
it as well?

IMHO, it is beyond the role of this class to provide the proposed method.
>From the POV of the interpolator, it is an error to pass values outside the 
>range (hence raising an exception is the appropriate behaviour).
Since the caller knows the valid range, it can, and should, intercept what 
would be invalid calls to the library code (at the quite modest cost of storing 
4 {{double}} variables).

                
> Allow code to avoid OutOfRangeException
> ---------------------------------------
>
>                 Key: MATH-989
>                 URL: https://issues.apache.org/jira/browse/MATH-989
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Ajo Fod
>         Attachments: patch
>
>
> Exceptions are generally costlier than a test. In the 
> BicubicSplineInterpolatingFunction, there is no way to determine if a given x 
> is in domain of the interpolator. So, I suggest a function to allow this 
> check.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to