So the method behind the madness here is that the (i-1)-dimensional spinal length for the node X is always going to be one greater than that of the (i-1)-dimensional successor of X, since this is the dimension over which the head of X ranges. Hence this value gets imported directly from r_{i-1}. The n value for X is then permitted to range between 0 and this value.
The remaining spinal lengths for X, which are all in a higher dimension, depend on where the head is; if X itself is the head (i.e. n = 0), then we need to simply take those lengths for the successors in their respective dimensions and add one to each to reflect the links in between. Otherwise, we need to actually find the head (denoted head(X,n)) and simply copy the spinal lengths from there.
Posted by: kellyia at June 30, 2004 06:51 PM