You can make multidimensional containers in perl5 by settling
on a syntax for combining all the dimensions into a key value and
using that as the key in a hash.

If arrays as we know them implement by using a key space restricted to
integers, I think a reasonable way to get matrices would be to open
up their key space to lists of integers.

A comparison operator that works on lists of integers 

         until($a[$n++] <=> $b[$n++]) {check they both still exist}

to use w/in the tree structure

would work, that would group data by last listed dimension.


This is for the sparse case, as soon as it gets more than half full
(we do some simulating to determine the optimal percentage? Have it
settable as a container attribute?)
we copy it to a big C array of data or pointers, depending on if the
data are constantly sized.


Have I got  the idea?


-- 
                          David Nicol 816.235.1187 [EMAIL PROTECTED]
                       safety first: Republicans for Nader in 2000

Reply via email to