Quoth Luke Palmer on Monday 31 January 2005 03:46 pm, > C_{ijkl} = A_{ij} * B_{kl} > > You write either of: > > Â @C[$^i; $^j; $^k; $^l] = @A[$^i; $^j] * @B[$^k; $^l] Â > @C = Â @A[$^i; $^j] * @B[$^k; $^l] Â
Hmm... This is both insanely great and also greatly insane. The issue is that, although the tensor notation is powerful, the readability is becoming lost in all the sigils/funny_characters on the thread variables. Most of the non-perl-geek scientific-computing people I know already balk at the '$' and '@' characters because they increase the amount of black noise in scientific code too much; constructions like that just might send them all screaming back to FORTRAN. Is there a way to generalize that reduces the amount of black noise so that the expression shines through? << @C[ ^i; ^j; ^k; ^l ] = @A[ ^i; ^j ] * @B[ ^k; ^l ] >> is much better from a readability standpoint since the j's and k's are actually visible, but may be horrific from a parsing perspective.