Math-WalshTransform
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
WalshTransform.pm view on Meta::CPAN
}
sub old_logical_convolution { my ($xref, $yref) = @_;
if (ref $xref ne 'ARRAY') { warn
"Math::WalshTransform::logical_convolution 1st arg must be array ref\n";
return undef;
} elsif (ref $yref ne 'ARRAY') { warn
"Math::WalshTransform::logical_convolution 2nd arg must be array ref\n";
return undef;
}
local $[ = 0;
my @x = @$xref; my @y = @$yref;
my $n = scalar @x;
my @z; $#z=$#x;
my $j; my $k; my $sum;
for ($k=$[; $k<=$#x; $k++) {
$sum = 0.0;
for ($j=$[; $j<=$#x; $j++) { $sum += $x[$j^$k] * $y[$j]; }
$z[$k] = $sum/$n;
}
return @z;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.075 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )