diagonal matrices specializations

Jaroslav Hajek highegg at gmail.com
Thu Dec 11 00:28:48 CST 2008


---------- Forwarded message ----------
From: Jaroslav Hajek <highegg at gmail.com>
Date: Wed, Dec 10, 2008 at 7:17 PM
Subject: Re: diagonal matrices specializations
To: "John W. Eaton" <jwe at octave.org>


On Wed, Dec 10, 2008 at 2:16 PM, John W. Eaton <jwe at octave.org> wrote:
> On 10-Dec-2008, Jaroslav Hajek wrote:
>
> | I see. Is it OK if I just leave it in the current state (no saving of
> | diagonal matrices) and wait until it gets fixed?
>
> Would that mean that save would fail with an error if someone
> attempted to save a workspace that contained a diagonal matrix?  That
> would be surprising and a regression from previous versions of Octave,
> so I think we should at least convert them to full matrices that can
> be saved in the HDF format.
>

OK, that's right, it will fail. However, the converting is not that
easy, because what the HDF5 saving code does is that it asks an
octave_value "what type are you of?", then stores the type name, and
then calls the value "now save yourself".
Instead, the sequence needs to be changed to:
"are you hdf-5 saveable?"
if yes, then "what type are you of?", write type, "save yourself".
if not, then "convert yourself" (numeric_conversion), and repeat.
No big deal, but a little more work.
Apparently whoever implemented the hdf5 exporting assumed that
Octave's types map exactly to the exported data. If David (or someone
else) wants to rewrite the hdf5 code, then he may want to things in a
completely different manner, so the work will be useless.
Perhaps David can comment on whether the above pictured change is the
way to go, or if he has a different idea.

--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


More information about the Octave-maintainers mailing list