Jump to content

Deconvolution/1D: Difference between revisions

m
→‎{{header|Perl 6}}: bug in 'trim_system', omit
m (→‎{{header|Perl 6}}: bug in 'trim_system', omit)
Line 662:
=={{header|Perl 6}}==
{{works with|Rakudo 2015-09-07}}
<!-- SqrtNegInf: 'trim_system' was causing the calc. to fail, so skip for now -->
 
Translation of Python, using a modified version of the Reduced Row Echelon Form subroutine <code>rref()</code> from [[Reduced row echelon form#Perl 6|here]].
Line 686 ⟶ 687:
return unless $m;
my ($lead, $rows, $cols) = 0, +$m, +$m[0];
 
# Trim off over specified rows if they exist.
# Not strictly necessary, but can save a lot of
# redundant calculations. [remove until debugged]
# if $rows >= $cols {
# $m = trim_system($m);
# $rows = +$m;
# }
 
for ^$rows -> $r {
$lead < $cols or return $m;
2,392

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.