$op = $op->first;
redo;
}
- diag "> $n ($c)" if $DEBUG;
+ diag "> $n" if $DEBUG;
my ($rc, $lc) = $self->inspect($op);
+ $c = 1 - count $r;
+ diag Dumper [ $c, $r, \@l, $rc, $lc ] if $DEBUG;
$r = add $r, scale $c, $rc if defined $rc;
- if ($rc and not defined $lc) {
+ if (not defined $lc) {
@l = ();
last;
}
push @l, scale $c, $lc;
- $c *= count $lc if defined $lc;
}
- my $l = combine @l;
+# diag Dumper \@l if $DEBUG;
+ my $l = scale +(1 - count $r), normalize combine @l;
return $r, $l;
}