Adding typemaps, tests and documentation for gsl_matrix_view_array and gsl_matrix_vie...
[Math-GSL.git] / examples / rng
blobf92e950670cb77b64528ea66dd78d23270e4d85a
1 #!/usr/bin/perl -w
3 use strict;
4 use Math::GSL::RNG qw/:all/;
6 my $rng = Math::GSL::RNG->new($gsl_rng_knuthran, int rand(1e5) );
7 my ($num,$min,$max) = @ARGV;
8 $num ||= 10;
9 $min ||= 0;
10 $max ||= 100;
12 print join("\n", map { $min + $rng->get % ($max-$min+1) } (1..$num)) . "\n";