Einstein Summation Notation
Not familiar with this specifically, but named axes have been suggested, and I was discussing them with somebody recently. I think they are an interesting idea, but do not like them; I think they are either noncompositional and error-prone or else so incapable as to be useless (depending on how they are specified).
Error-prone because it is easy to accidentally use different name in multiple places for the same thing. Noncompositional for two reasons:
1. If module X produces arrays, and module Y produces arrays, and module Z wants to consume both X and Y, it must establish a mapping between their axes, which comes for free (or much more cheaply) with ordered axes.
2. Axes are ordered; when adding (say), there is some sequence of overlapping axes, some sequence of trailing unshared axes (only in one argument), and some sequence of nonoverlapping leading axes (in both arguments) which are outer-producted. If you are careful, you can arrange either to freely add trailing axes or to freely add leading ones, within a given context. With named axes, all unshared axes must be taken as leading axes.
I can dimly imagine a solution to 2 which involves associating with an array some sort of graph whose nodes point to axes. The equivalent to 'rank', then, would specify a 'root' node within each array. Elaboration welcome; I have no idea of the details.
The other multidimensional primitives that I can think of are Shift and Rotate, which can act on axes specified by their left argument, similar to transpose.
Also { } {. }.. And apl's dyadic grade, if I understand it properly. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm