AI-Calibrate

 view release on metacpan or  search on metacpan

t/AI-Calibrate-1.t  view on Meta::CPAN

                return(0);
            }
        } else {
            return(0);
        }
    }
    return(1);
}

#  Given an array reference, shuffle the array.  This is the Fisher-Yates code
#  from The Perl Cookbook.
sub shuffle_array {
   my($array) = shift;
   my($i);
   for ($i = @$array ; --$i; ) {
      my $j = int rand ($i+1);
      next if $i == $j;
      @$array[$i,$j] = @$array[$j,$i]
   }
}



( run in 0.231 second using v1.01-cache-2.11-cpan-e9199f4ba4c )