It is little enough code that writing it yourself is likely often much less time-consuming than finding an appropriate solution, much less getting that solution installed. But, I'd have implemented in terms of some useful abstractions that I personally keep at-hand:
use List::Util 'reduce'; use Algorithm::Loops 'MapCarE'; my $prod= reduce {$a+$b} MapCarE { reduce {$a*$b} @_ } \( @x, @y, @z ) +;
- tye
In reply to Re^2: Dot product of three matrices (wheels)
by tye
in thread Dot product of three matrices
by Angharad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |