On Wed, 2 Nov 2011, Allin Cottrell wrote:
On Wed, 2 Nov 2011, Riccardo (Jack) Lucchetti wrote:
> On Tue, 1 Nov 2011, Allin Cottrell wrote:
>
>> (b) Row and/or column names are attached to the gretl_matrix struct
>> itself, rather than the wrapper. That is more plausible, but I still
>> don't like it much. The extra memory required for an empty
>> gretl_matrix would only be two pointers (8 bytes on a 32-bit system)
>> but it represents additional complexity that I'd prefer to keep out
>> of what is in concept a mathematical type.
>
> I agree: matrices should stay as lean-and-mean as possible. Besides, there
> is the possibility of achieving Artur's original aim in Hansl, albeit in a
> way that most people will find a bit convoluted: here's two ways to do it
> [...]
Thanks, Jack. These functions nicely illustrate what you can do with bundles.
But after some more thinking I think I may have come up with a solution to
the matrix column/row names issue which satisfies the "lean and mean"
criterion as well as allowing a simple way to return decorated matrices from
functions. [...]
I'm not committing this change just yet since it needs more testing, but I'm
hopeful it'll do the job.
I've now done enough checking to say that nothing obvious is
broken with the changes I mentioned, so I'm now putting them
into CVS. But I'll do some more testing over the next few
days.
Allin