saving/loading a hashed array from/to file



On 3/10/12, andre maute <andre.maute at gmx.de> wrote:

> (%i10) arrayinfo(F)
> (%o10) [hashed,1,[1],[2],[3],[4],[[1,1]],[[2,2]],[[3,3]],[[4,4]]]
> (%i11) listarray(F)
> (%o11) [11,22,33,44,[11,11],[22,22],[33,33],[44,44]]
>
> but don't want to recalculate using F,
> how can I attach this data to F?

F[x] : y when F is an array function (i.e. defined as F[x] := ...)
assigns specific (uncalculated) values.

So something like

xx : rest (rest (my_arrayinfo_stuff));
yy : my_listarray_stuff;

for i thru length (xx) do F [first (xx [i])] : yy [i];

HTH

Robert Dodier