Anonymous user
Matrix multiplication: Difference between revisions
Updated second D entry
m (→{{header|Ruby}}: shortened one line of code) |
(Updated second D entry) |
||
Line 952:
<lang d>import std.stdio, std.range, std.array, std.numeric, std.algorithm;
T[][] matMul(T)(in T[][] A, in T[][] B) /*pure
const Bt = B[0].length.iota.map!(i=> B.transversal(i).array).array;
return A.map!(a => Bt.map!(b => a.dotProduct(b)).array).array;
|