![]() |
Blitz Devel : |
From: Sureshkumar Devanathan (mdsuresh_at_[hidden])
Date: 2003-12-05 10:10:50
Dear Dr. Cummings,
The idea of stacking arrays, is extensionsible , beyond 2 dimensions.
For example, a 3 dimensional box, can be stack by a 1d(line) element,
implicit size (1,1,x), 2d(area) element (1,y,x) and a 3d (volume)
(z',y',x)
element.
In general, any n dimensional structure, must be stackable, by( n-2)
dimensional, (n-1) dimensional, n dimensional array where the sizes much
implicity conform to (1,1,a,b,c,....) , ( 1,x,a,b,c,....) and
(y',x',a,b,c,....) respectively.
Secondly, currently, the delim<';'>() and its respective initializers are
there only as proofs as concept, and there is room, for efficiency.
In fact, my goal with delim<'['>() initially was, not just to initialize
an array, or just fill spaces, but to be able to detect the size on the
RHS and setup LHS accordingly, similar to MATLAB statement
a = [ 1 2 ; 3 4].
---Regarding other things----
Null Ranges and Null Arrays
To picture null ranges like Range(1,-1,1) and a null slice of an array
created by such ranges, imagine an eggcrate. This example is adopted from
Gravitation by MTW.
When you collapse the egg crate, its volume goes to 0. But it still has
surface area. Similarly, an null Array with one of its dimensonal lengths
set to 0 , could be seen as a collasped eggcrate, with 0 n-d volume, but
that has well defined (n-1)-d volme.
When the user tries to slice the array with Range(1,-1,1), you can imagine
him, equivalently, trying to collapse an eggcrate, even more, below 0
volume, by punching it as hard as possible. He cannot get its
volume below 0, no matter how hard he tries. Similarly,by slicing an array
with Range(1,-1,1), he is trying to make the impossible happen, ie, make
the n-d volume run negative, but at best his efforts succeeding in making
the volume 0.
-suresh