in reply to Re: for-loop issue - swap gets crazy large
in thread for-loop issue - swap gets crazy large

Stupid question. Can I "slice or destroy" $distance[$u-1][$s-1] after the last (-1)  if($distance[$u][$s] < $minDistance) The only thing I like to find is what $weight[$dim][$s] is closest to $input[$dim][$u]. I don't need this 2x-array anymore. BTW, the 600 seconds work for a small $S. With $S=100000 the process will be destroyed. :(

Replies are listed 'Best First'.
Re^3: for-loop issue - swap gets crazy large
by ikegami (Patriarch) on Aug 31, 2011 at 20:44 UTC
    my @last_distance; # Use instead of @{ $distance[$u-1] } my @this_distance; # Use instead of @{ $distance[$u-0] } for($u = 0; $u < $U; $u++ ) { ... @last_distance = @this_distance; }