Strassen's algorithm: Difference between revisions
m
→{{header|Raku}}: I should have RTFM
(→{{header|Raku}}: minor updates + some comments) |
m (→{{header|Raku}}: I should have RTFM) |
||
Line 484:
=={{header|Raku}}==
Special thanks go to the module author, [https://github.com/frithnanth Fernando Santagata], on showing how to deal with a pass-by-value case.
{{trans|Julia}}
<lang perl6># 20210126 Raku programming solution
Line 508 ⟶ 509:
sub infix:<⊕>(\x,\y) { # custom addition
my Math::Libgsl::Matrix \z .= new: x.size1, x.size2;
z.copy(x).add(y)
}
sub infix:<⊖>(\x,\y) { # custom subtraction
my Math::Libgsl::Matrix \z .= new: x.size1, x.size2;
z.copy(x).sub(y)
}
|