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
Merge branch 'bleed' of http://thgate.net/git/Math-GSL into bleed
[Math-GSL.git]
/
examples
/
rng
blob
f92e950670cb77b64528ea66dd78d23270e4d85a
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
)) .
"
\n
"
;