Matrix multiplication: Difference between revisions

Content added Content deleted
Line 729:
} body {
auto result = new T[][](m1.length, m2[0].length);
 
foreach (i, m1_row_i; m1)
foreach (j; 0 .. m2[0].length) {
Line 736 ⟶ 737:
result[i][j] = aux;
}
 
return result;
}
Line 749 ⟶ 751:
enum a = [[1, 2], [3, 4], [3, 6]];
enum b = [[-3, -8, 3,], [-2, 1, 4]];
 
writeln("A = \n", prettyPrint(a));
writeln("\nB = \n", prettyPrint(b));