Deconvolution/2D+: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Added version of perl 6 tested under.) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Fixed up some formatting) |
||
Line 177: | Line 177: | ||
my @coords; |
my @coords; |
||
my $j = $index; |
my $j = $index; |
||
for @hsize -> $dim{ |
for @hsize -> $dim { |
||
@coords.push( $j % $dim ); |
@coords.push( $j % $dim ); |
||
$j div= $dim; |
$j div= $dim; |
||
Line 246: | Line 246: | ||
my $tab = 2; |
my $tab = 2; |
||
if @array[0] ~~ Array { |
if @array[0] ~~ Array { |
||
say ' ' x $indent,"["; |
say ' ' x $indent,"["; |
||
pretty_print( $_, $indent + $tab ) for @array; |
pretty_print( $_, $indent + $tab ) for @array; |
||
say ' ' x $indent, "]{$indent??','!!''}"; |
say ' ' x $indent, "]{$indent??','!!''}"; |
||
} else { |
} else { |
||
say ' ' x $indent, "[{say_it(@array)} ]{$indent??','!!''}"; |
|||
} |
} |
||
Line 299: | Line 299: | ||
=begin skip_output |
=begin skip_output |
||
say " |
say "g ="; |
||
pretty_print( @g ); |
pretty_print( @g ); |
||
say '-' x 79; |
say '-' x 79; |
||
say " |
say "f ="; |
||
pretty_print( @f ); |
pretty_print( @f ); |
||
Line 311: | Line 311: | ||
say "# {+size_of(@f)}D array:"; |
say "# {+size_of(@f)}D array:"; |
||
say " |
say "h ="; |
||
pretty_print( deconv_ND( @g, @f ) );</lang> |
pretty_print( deconv_ND( @g, @f ) );</lang> |
||
Output: |
Output: |
||
<pre># 3D array: |
<pre># 3D array: |
||
h = |
|||
[ |
[ |
||
[ |
[ |