Mon Jun 05 2000 09:15: Why does it {hurt when I pee, take me so long to derive the mapping of an element of an n-dimensional array to an element of a one-dimensional array}? It's not difficult, yet I must needs fill up a whole page with poorly drawn diagrams and equations to figure it out.

BTW, if i_{1}...i_{n} are the indices of the array element, and s_{k} is the size of dimension k in the array, than the mapping is:

a[i_{1}, i_{2}, ... i_{n}] =
b[i_{1} + E{j=2..n}(i_{j} * T{k=1..j-1}(s_{k}))]

The E and T are symbolic of summation and multiplication summation (I forgot the term, but it's the pi summation as opposed to the sigma summation), respectively. Damn these non-MathML-supporting browsers.

Now I need to use this to make my ArrayElementNodes capable of figuring
out where in the actual (one-dimensional) array they reference. Then,
they will become self-aware and take over the world! **AH HA HA HA HA!**

Or maybe they will just help me get my compiler done.