W
wpegden
Hmm... maybe I've overlooked this in the documentation, but...
I want to be able to have arrays of arbitrary dimension. So not
dimension 1 or 2 or 3, but dimension k. Thus ideally, I would like to
be able to access elements of the array by giving the indices as a 1
dimensional array.
For example:
@index is a (1 dimensional) array of length $k containing nonnegative
integers.
I want to have an array @Vset of dimension $k, and I want to be able to
access the element corresponding to (for example) @index.
So if $k=4 then @index has length 4 and @Vset has dimension 4.
If @index was (1,2,2,3), I would somehow be able to find out the
element $Vset[1][2][2][3]
(Just to reiterate, $k is not fixed).
Thanks very much,
Wes
(I posted this in alt.perl before noticing this was the more
appropriate group.)
I want to be able to have arrays of arbitrary dimension. So not
dimension 1 or 2 or 3, but dimension k. Thus ideally, I would like to
be able to access elements of the array by giving the indices as a 1
dimensional array.
For example:
@index is a (1 dimensional) array of length $k containing nonnegative
integers.
I want to have an array @Vset of dimension $k, and I want to be able to
access the element corresponding to (for example) @index.
So if $k=4 then @index has length 4 and @Vset has dimension 4.
If @index was (1,2,2,3), I would somehow be able to find out the
element $Vset[1][2][2][3]
(Just to reiterate, $k is not fixed).
Thanks very much,
Wes
(I posted this in alt.perl before noticing this was the more
appropriate group.)