octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some questions on the interval package


From: Oliver Heimlich
Subject: Re: Some questions on the interval package
Date: Fri, 16 Jun 2017 23:30:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hi Joel,

thanks for your blog post [1] and let me address the remaining questions.

On 14.06.2017 12:05, Joel Dahne wrote:
> interval_bitpack, __split_interval_literals__.m, exacttointerval.m: I
> see no obvious way to generalize these to N dimensions. For example the
> standard bitpack only returns vectors. The function
> __split_interval_literals__ is used to split up a string representing a
> vector or a matrix of intervals. As far as I know there is no way to
> create an array with more than 2 dimensions using strings.

As you've already stated in the blog, there is no obvious way to denote
interval literals in 3 dimensions as strings.  So you can leave
__split_interval_literals__ as is.
*go-to-next-entry-in-third-dimension-emoji*

interval_bitpack should accept logical ND arrays as input, but the
output will always be a 2D.  That's what is supported by the built-in
bitpack function.

> meshgrid.m, ndgrid.m: The interval package has no implementation of
> ndgrid so my idea was to add it. Then I realized that the standard
> implementation of ndgrid actually works for intervals as well. That is
> the case for the standard meshgrid as well. … The question is:
> should we overload ndgrid with one that converts all input to interval
> or should we remove meshgrid and fall back to the standard
> implementation? I at least think it is reasonable to handle them both in
> the same way.

After reading your reasoning in the blog post, I agree that you should
remove the meshgrid implementation.  Additional thoughts on the topic:

 - meshgrid does not combine values from its arguments, it only combines
their size.  So this is not an interval arithmetic function (range
evaluation), where you'd expect interval enclosure for the overall
output.  Each argument is manipulated (resized) individually, so there's
no need to change types.

 - meshgrid does not introduce numeric errors.  Good.

 - meshgrid is mainly used for plotting, and it is no problem to pass
output to the plotting functions even if not all parameters are intervals.

 - If you remove meshgrid, please remember to update INDEX and describe
the changed behavior in doc/NEWS.texinfo for the upcoming release.  The
upcoming version number will be at least 2.2.0, not 2.1.1.

 - You should move the (revised) tests for meshgrid into a new file
inst/test/meshgrid.tst.  This way we can verify correctness of the
function, which is no longer part of the package.  Execute the test with
“test test/meshgrid.tst” inside Octave or with with “make test-bist” (or
as part of the full test suite “make check”).

Best
Oliver


[1] https://gsocinterval.blogspot.de/2017/06/construction-and-printing.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]