repo.or.cz
/
Math-GSL.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Refactor Matrix tests, put gsl_matrix_set_zero($self->{matrix}) in make_fixture to...
[Math-GSL.git]
/
examples
/
rng
blob
06246beca16af1bcbf3c5a236fa7bd9faaf3de2d
1
#!/usr/bin/perl -w
2
3
use
strict
;
4
use
Math
::
GSL
::
RNG qw
/:all/
;
5
6
my
$rng
=
Math
::
GSL
::
RNG
->
new
(
$gsl_rng_knuthran
,
int rand
(
1
e5
) );
7
my
(
$num
,
$min
,
$max
) =
@ARGV
;
8
$num
||=
10
;
9
$min
||=
0
;
10
$max
||=
100
;
11
12
print join
"
\n
"
,
map
{
$min
+
$rng
->
get
% (
$max
-
$min
+
1
) } (
1
..
$num
);