octave-maintainers
[Top][All Lists]
Advanced

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

Some questions on the interval package


From: Joel Dahne
Subject: Some questions on the interval package
Date: Wed, 14 Jun 2017 10:05:28 +0000

Hi!

I have begun the work on adding support for constructing and printing
N-dimensional interval arrays. Most of the functions are just wrappers
around Octaves standard functions and thus do not need much
changes. However for some functions I'm not sure how to handle the
changes for. I list the ones I have questions about. More information about
the rest of the work will come in a blog-post tomorrow or on Friday. I
have pushed most of the changes to my remote repository, so if you want
to try the new functionality you can clone that.

disp.m: When printing an array with more than 2 dimensions I have
followed the normal Octave style. It looks like
 ans(:,:,1) =

   [0]   [0]
   [0]   [0]
Should we use an equality sign here only when the representation is
exact and a subset sign otherwise? It might happen that some submatrices
are exact and others not. Should we use a subset sign on all submatrices
if at least one is not exact? Currently I use equality signs everywhere.

linspace.m and mince.m: In the standard implementation these can only
take scalars or vectors as input. They could however be generalized to
also allow for N-dimensional arrays as input, but this has not been
done. Should we implement this for intervals? The same questions goes
for mince.m which is just an interval generalization if linspace.m.

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.

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. There is however a
difference compared to the interval version of meshgrid, the standard
version does no convert all input to intervals, it allows non-uniform
output (try for example [x y] = ndgrid (infsup (1:3), 4:6)). This is
probably intended, in some cases you might want a grid of different
types. However since the interval version of meshgrid overloads the
standard version this cannot be done for intervals. 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.

I think that is all the questions I have for now.

Regards,
Joel



reply via email to

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