1RNG(3) User Contributed Perl Documentation RNG(3)
2
3
4
6 PDL::GSL::RNG - PDL interface to RNG and randist routines in GSL
7
9 This is an interface to the rng and randist packages present in the GNU
10 Scientific Library.
11
13 use PDL;
14 use PDL::GSL::RNG;
15
16 $rng = PDL::GSL::RNG->new('taus');
17
18 $rng->set_seed(time());
19
20 $x=zeroes(5,5,5)
21
22 $rng->get_uniform($x); # inplace
23
24 $y=$rng->get_uniform(3,4,5); # creates new pdl
25
27 Throughout this documentation we strive to use the same variables that
28 are present in the original GSL documentation (see See Also).
29 Oftentimes those variables are called "a" and "b". Since good Perl
30 coding practices discourage the use of Perl variables $a and $b, here
31 we refer to Parameters "a" and "b" as $pa and $pb, respectively, and
32 Limits (of domain or integration) as $la and $lb.
33
35 new
36 The new method initializes a new instance of the RNG.
37
38 The available RNGs are:
39
40 coveyou cmrg fishman18 fishman20 fishman2x gfsr4 knuthran
41 knuthran2 knuthran2002 lecuyer21 minstd mrg mt19937 mt19937_1999
42 mt19937_1998 r250 ran0 ran1 ran2 ran3 rand rand48 random128_bsd
43 random128_glibc2 random128_libc5 random256_bsd random256_glibc2
44 random256_libc5 random32_bsd random32_glibc2 random32_libc5
45 random64_bsd random64_glibc2 random64_libc5 random8_bsd
46 random8_glibc2 random8_libc5 random_bsd random_glibc2
47 random_libc5 randu ranf ranlux ranlux389 ranlxd1 ranlxd2 ranlxs0
48 ranlxs1 ranlxs2 ranmar slatec taus taus2 taus113 transputer tt800
49 uni uni32 vax waterman14 zuf default
50
51 The last one (default) uses the environment variable GSL_RNG_TYPE.
52
53 Note that only a few of these rngs are recommended for general use.
54 Please check the GSL documentation for more information.
55
56 Usage:
57
58 $blessed_ref = PDL::GSL::RNG->new($RNG_name);
59
60 Example:
61
62 $rng = PDL::GSL::RNG->new('taus');
63
64 set_seed
65 Sets the RNG seed.
66
67 Usage:
68
69 $rng->set_seed($integer);
70 # or
71 $rng = PDL::GSL::RNG->new('taus')->set_seed($integer);
72
73 Example:
74
75 $rng->set_seed(666);
76
77 min
78 Return the minimum value generable by this RNG.
79
80 Usage:
81
82 $integer = $rng->min();
83
84 Example:
85
86 $min = $rng->min(); $max = $rng->max();
87
88 max
89 Return the maximum value generable by the RNG.
90
91 Usage:
92
93 $integer = $rng->max();
94
95 Example:
96
97 $min = $rng->min(); $max = $rng->max();
98
99 name
100 Returns the name of the RNG.
101
102 Usage:
103
104 $string = $rng->name();
105
106 Example:
107
108 $name = $rng->name();
109
110 get
111 This function creates a piddle with given dimensions or accepts an
112 existing piddle and fills it. get() returns integer values between a
113 minimum and a maximum specific to every RNG.
114
115 Usage:
116
117 $piddle = $rng->get($list_of_integers)
118 $rng->get($piddle);
119
120 Example:
121
122 $x = zeroes 5,6;
123 $o = $rng->get(10,10); $rng->get($x);
124
125 get_int
126 This function creates a piddle with given dimensions or accepts an
127 existing piddle and fills it. get_int() returns integer values between
128 0 and $max.
129
130 Usage:
131
132 $piddle = $rng->get($max, $list_of_integers)
133 $rng->get($max, $piddle);
134
135 Example:
136
137 $x = zeroes 5,6; $max=100;
138 $o = $rng->get(10,10); $rng->get($x);
139
140 get_uniform
141 This function creates a piddle with given dimensions or accepts an
142 existing piddle and fills it. get_uniform() returns values 0<=x<1,
143
144 Usage:
145
146 $piddle = $rng->get_uniform($list_of_integers)
147 $rng->get_uniform($piddle);
148
149 Example:
150
151 $x = zeroes 5,6; $max=100;
152 $o = $rng->get_uniform(10,10); $rng->get_uniform($x);
153
154 get_uniform_pos
155 This function creates a piddle with given dimensions or accepts an
156 existing piddle and fills it. get_uniform_pos() returns values 0<x<1,
157
158 Usage:
159
160 $piddle = $rng->get_uniform_pos($list_of_integers)
161 $rng->get_uniform_pos($piddle);
162
163 Example:
164
165 $x = zeroes 5,6;
166 $o = $rng->get_uniform_pos(10,10); $rng->get_uniform_pos($x);
167
168 ran_shuffle
169 Shuffles values in piddle
170
171 Usage:
172
173 $rng->ran_shuffle($piddle);
174
175 ran_shuffle_vec
176 Shuffles values in piddle
177
178 Usage:
179
180 $rng->ran_shuffle_vec(@vec);
181
182 ran_choose
183 Chooses values from $inpiddle to $outpiddle.
184
185 Usage:
186
187 $rng->ran_choose($inpiddle,$outpiddle);
188
189 ran_choose_vec
190 Chooses $n values from @vec.
191
192 Usage:
193
194 @chosen = $rng->ran_choose_vec($n,@vec);
195
196 ran_gaussian
197 Fills output piddle with random values from Gaussian distribution with
198 mean zero and standard deviation $sigma.
199
200 Usage:
201
202 $piddle = $rng->ran_gaussian($sigma,[list of integers = output piddle dims]);
203 $rng->ran_gaussian($sigma, $output_piddle);
204
205 Example:
206
207 $o = $rng->ran_gaussian($sigma,10,10);
208 $rng->ran_gaussian($sigma,$o);
209
210 ran_gaussian_var
211 This method is similar to ran_gaussian except that it takes the
212 parameters of the distribution as a piddle and returns a piddle of
213 equal dimensions.
214
215 Usage:
216
217 $piddle = $rng->ran_gaussian_var($sigma_piddle);
218 $rng->ran_gaussian_var($sigma_piddle, $output_piddle);
219
220 Example:
221
222 $sigma_pdl = rvals zeroes 11,11;
223 $o = $rng->ran_gaussian_var($sigma_pdl);
224
225 ran_additive_gaussian
226 Add Gaussian noise of given sigma to a piddle.
227
228 Usage:
229
230 $rng->ran_additive_gaussian($sigma,$piddle);
231
232 Example:
233
234 $rng->ran_additive_gaussian(1,$image);
235
236 ran_bivariate_gaussian
237 Generates $n bivariate gaussian random deviates.
238
239 Usage:
240
241 $piddle = $rng->ran_bivariate_gaussian($sigma_x,$sigma_y,$rho,$n);
242
243 Example:
244
245 $o = $rng->ran_bivariate_gaussian(1,2,0.5,1000);
246
247 ran_poisson
248 Fills output piddle by with random integer values from the Poisson
249 distribution with mean $mu.
250
251 Usage:
252
253 $piddle = $rng->ran_poisson($mu,[list of integers = output piddle dims]);
254 $rng->ran_poisson($mu,$output_piddle);
255
256 ran_poisson_var
257 Similar to ran_poisson except that it takes the distribution parameters
258 as a piddle and returns a piddle of equal dimensions.
259
260 Usage:
261
262 $piddle = $rng->ran_poisson_var($mu_piddle);
263
264 ran_additive_poisson
265 Add Poisson noise of given $mu to a $piddle.
266
267 Usage:
268
269 $rng->ran_additive_poisson($mu,$piddle);
270
271 Example:
272
273 $rng->ran_additive_poisson(1,$image);
274
275 ran_feed_poisson
276 This method simulates shot noise, taking the values of piddle as values
277 for $mu to be fed in the poissonian RNG.
278
279 Usage:
280
281 $rng->ran_feed_poisson($piddle);
282
283 Example:
284
285 $rng->ran_feed_poisson($image);
286
287 ran_bernoulli
288 Fills output piddle with random values 0 or 1, the result of a
289 Bernoulli trial with probability $p.
290
291 Usage:
292
293 $piddle = $rng->ran_bernoulli($p,[list of integers = output piddle dims]);
294 $rng->ran_bernoulli($p,$output_piddle);
295
296 ran_bernoulli_var
297 Similar to ran_bernoulli except that it takes the distribution
298 parameters as a piddle and returns a piddle of equal dimensions.
299
300 Usage:
301
302 $piddle = $rng->ran_bernoulli_var($p_piddle);
303
304 ran_beta
305 Fills output piddle with random variates from the beta distribution
306 with parameters $pa and $pb.
307
308 Usage:
309
310 $piddle = $rng->ran_beta($pa,$pb,[list of integers = output piddle dims]);
311 $rng->ran_beta($pa,$pb,$output_piddle);
312
313 ran_beta_var
314 Similar to ran_beta except that it takes the distribution parameters as
315 a piddle and returns a piddle of equal dimensions.
316
317 Usage:
318
319 $piddle = $rng->ran_beta_var($a_piddle, $b_piddle);
320
321 ran_binomial
322 Fills output piddle with random integer values from the binomial
323 distribution, the number of successes in $n independent trials with
324 probability $p.
325
326 Usage:
327
328 $piddle = $rng->ran_binomial($p,$n,[list of integers = output piddle dims]);
329 $rng->ran_binomial($p,$n,$output_piddle);
330
331 ran_binomial_var
332 Similar to ran_binomial except that it takes the distribution
333 parameters as a piddle and returns a piddle of equal dimensions.
334
335 Usage:
336
337 $piddle = $rng->ran_binomial_var($p_piddle, $n_piddle);
338
339 ran_cauchy
340 Fills output piddle with random variates from the Cauchy distribution
341 with scale parameter $pa.
342
343 Usage:
344
345 $piddle = $rng->ran_cauchy($pa,[list of integers = output piddle dims]);
346 $rng->ran_cauchy($pa,$output_piddle);
347
348 ran_cauchy_var
349 Similar to ran_cauchy except that it takes the distribution parameters
350 as a piddle and returns a piddle of equal dimensions.
351
352 Usage:
353
354 $piddle = $rng->ran_cauchy_var($a_piddle);
355
356 ran_chisq
357 Fills output piddle with random variates from the chi-squared
358 distribution with $nu degrees of freedom.
359
360 Usage:
361
362 $piddle = $rng->ran_chisq($nu,[list of integers = output piddle dims]);
363 $rng->ran_chisq($nu,$output_piddle);
364
365 ran_chisq_var
366 Similar to ran_chisq except that it takes the distribution parameters
367 as a piddle and returns a piddle of equal dimensions.
368
369 Usage:
370
371 $piddle = $rng->ran_chisq_var($nu_piddle);
372
373 ran_exponential
374 Fills output piddle with random variates from the exponential
375 distribution with mean $mu.
376
377 Usage:
378
379 $piddle = $rng->ran_exponential($mu,[list of integers = output piddle dims]);
380 $rng->ran_exponential($mu,$output_piddle);
381
382 ran_exponential_var
383 Similar to ran_exponential except that it takes the distribution
384 parameters as a piddle and returns a piddle of equal dimensions.
385
386 Usage:
387
388 $piddle = $rng->ran_exponential_var($mu_piddle);
389
390 ran_exppow
391 Fills output piddle with random variates from the exponential power
392 distribution with scale parameter $pa and exponent $pb.
393
394 Usage:
395
396 $piddle = $rng->ran_exppow($pa,$pb,[list of integers = output piddle dims]);
397 $rng->ran_exppow($pa,$pb,$output_piddle);
398
399 ran_exppow_var
400 Similar to ran_exppow except that it takes the distribution parameters
401 as a piddle and returns a piddle of equal dimensions.
402
403 Usage:
404
405 $piddle = $rng->ran_exppow_var($a_piddle, $b_piddle);
406
407 ran_fdist
408 Fills output piddle with random variates from the F-distribution with
409 degrees of freedom $nu1 and $nu2.
410
411 Usage:
412
413 $piddle = $rng->ran_fdist($nu1, $nu2,[list of integers = output piddle dims]);
414 $rng->ran_fdist($nu1, $nu2,$output_piddle);
415
416 ran_fdist_var
417 Similar to ran_fdist except that it takes the distribution parameters
418 as a piddle and returns a piddle of equal dimensions.
419
420 Usage:
421
422 $piddle = $rng->ran_fdist_var($nu1_piddle, $nu2_piddle);
423
424 ran_flat
425 Fills output piddle with random variates from the flat (uniform)
426 distribution from $la to $lb.
427
428 Usage:
429
430 $piddle = $rng->ran_flat($la,$lb,[list of integers = output piddle dims]);
431 $rng->ran_flat($la,$lb,$output_piddle);
432
433 ran_flat_var
434 Similar to ran_flat except that it takes the distribution parameters as
435 a piddle and returns a piddle of equal dimensions.
436
437 Usage:
438
439 $piddle = $rng->ran_flat_var($a_piddle, $b_piddle);
440
441 ran_gamma
442 Fills output piddle with random variates from the gamma distribution.
443
444 Usage:
445
446 $piddle = $rng->ran_gamma($pa,$pb,[list of integers = output piddle dims]);
447 $rng->ran_gamma($pa,$pb,$output_piddle);
448
449 ran_gamma_var
450 Similar to ran_gamma except that it takes the distribution parameters
451 as a piddle and returns a piddle of equal dimensions.
452
453 Usage:
454
455 $piddle = $rng->ran_gamma_var($a_piddle, $b_piddle);
456
457 ran_geometric
458 Fills output piddle with random integer values from the geometric
459 distribution, the number of independent trials with probability $p
460 until the first success.
461
462 Usage:
463
464 $piddle = $rng->ran_geometric($p,[list of integers = output piddle dims]);
465 $rng->ran_geometric($p,$output_piddle);
466
467 ran_geometric_var
468 Similar to ran_geometric except that it takes the distribution
469 parameters as a piddle and returns a piddle of equal dimensions.
470
471 Usage:
472
473 $piddle = $rng->ran_geometric_var($p_piddle);
474
475 ran_gumbel1
476 Fills output piddle with random variates from the Type-1 Gumbel
477 distribution.
478
479 Usage:
480
481 $piddle = $rng->ran_gumbel1($pa,$pb,[list of integers = output piddle dims]);
482 $rng->ran_gumbel1($pa,$pb,$output_piddle);
483
484 ran_gumbel1_var
485 Similar to ran_gumbel1 except that it takes the distribution parameters
486 as a piddle and returns a piddle of equal dimensions.
487
488 Usage:
489
490 $piddle = $rng->ran_gumbel1_var($a_piddle, $b_piddle);
491
492 ran_gumbel2
493 Fills output piddle with random variates from the Type-2 Gumbel
494 distribution.
495
496 Usage:
497
498 $piddle = $rng->ran_gumbel2($pa,$pb,[list of integers = output piddle dims]);
499 $rng->ran_gumbel2($pa,$pb,$output_piddle);
500
501 ran_gumbel2_var
502 Similar to ran_gumbel2 except that it takes the distribution parameters
503 as a piddle and returns a piddle of equal dimensions.
504
505 Usage:
506
507 $piddle = $rng->ran_gumbel2_var($a_piddle, $b_piddle);
508
509 ran_hypergeometric
510 Fills output piddle with random integer values from the hypergeometric
511 distribution. If a population contains $n1 elements of type 1 and $n2
512 elements of type 2 then the hypergeometric distribution gives the
513 probability of obtaining $x elements of type 1 in $t samples from the
514 population without replacement.
515
516 Usage:
517
518 $piddle = $rng->ran_hypergeometric($n1, $n2, $t,[list of integers = output piddle dims]);
519 $rng->ran_hypergeometric($n1, $n2, $t,$output_piddle);
520
521 ran_hypergeometric_var
522 Similar to ran_hypergeometric except that it takes the distribution
523 parameters as a piddle and returns a piddle of equal dimensions.
524
525 Usage:
526
527 $piddle = $rng->ran_hypergeometric_var($n1_piddle, $n2_piddle, $t_piddle);
528
529 ran_laplace
530 Fills output piddle with random variates from the Laplace distribution
531 with width $pa.
532
533 Usage:
534
535 $piddle = $rng->ran_laplace($pa,[list of integers = output piddle dims]);
536 $rng->ran_laplace($pa,$output_piddle);
537
538 ran_laplace_var
539 Similar to ran_laplace except that it takes the distribution parameters
540 as a piddle and returns a piddle of equal dimensions.
541
542 Usage:
543
544 $piddle = $rng->ran_laplace_var($a_piddle);
545
546 ran_levy
547 Fills output piddle with random variates from the Levy symmetric stable
548 distribution with scale $c and exponent $alpha.
549
550 Usage:
551
552 $piddle = $rng->ran_levy($mu,$x,[list of integers = output piddle dims]);
553 $rng->ran_levy($mu,$x,$output_piddle);
554
555 ran_levy_var
556 Similar to ran_levy except that it takes the distribution parameters as
557 a piddle and returns a piddle of equal dimensions.
558
559 Usage:
560
561 $piddle = $rng->ran_levy_var($mu_piddle, $a_piddle);
562
563 ran_logarithmic
564 Fills output piddle with random integer values from the logarithmic
565 distribution.
566
567 Usage:
568
569 $piddle = $rng->ran_logarithmic($p,[list of integers = output piddle dims]);
570 $rng->ran_logarithmic($p,$output_piddle);
571
572 ran_logarithmic_var
573 Similar to ran_logarithmic except that it takes the distribution
574 parameters as a piddle and returns a piddle of equal dimensions.
575
576 Usage:
577
578 $piddle = $rng->ran_logarithmic_var($p_piddle);
579
580 ran_logistic
581 Fills output piddle with random random variates from the logistic
582 distribution.
583
584 Usage:
585
586 $piddle = $rng->ran_logistic($m,[list of integers = output piddle dims]u)
587 $rng->ran_logistic($m,$output_piddle)
588
589 ran_logistic_var
590 Similar to ran_logistic except that it takes the distribution
591 parameters as a piddle and returns a piddle of equal dimensions.
592
593 Usage:
594
595 $piddle = $rng->ran_logistic_var($m_piddle);
596
597 ran_lognormal
598 Fills output piddle with random variates from the lognormal
599 distribution with parameters $mu (location) and $sigma (scale).
600
601 Usage:
602
603 $piddle = $rng->ran_lognormal($mu,$sigma,[list of integers = output piddle dims]);
604 $rng->ran_lognormal($mu,$sigma,$output_piddle);
605
606 ran_lognormal_var
607 Similar to ran_lognormal except that it takes the distribution
608 parameters as a piddle and returns a piddle of equal dimensions.
609
610 Usage:
611
612 $piddle = $rng->ran_lognormal_var($mu_piddle, $sigma_piddle);
613
614 ran_negative_binomial
615 Fills output piddle with random integer values from the negative
616 binomial distribution, the number of failures occurring before $n
617 successes in independent trials with probability $p of success. Note
618 that $n is not required to be an integer.
619
620 Usage:
621
622 $piddle = $rng->ran_negative_binomial($p,$n,[list of integers = output piddle dims]);
623 $rng->ran_negative_binomial($p,$n,$output_piddle);
624
625 ran_negative_binomial_var
626 Similar to ran_negative_binomial except that it takes the distribution
627 parameters as a piddle and returns a piddle of equal dimensions.
628
629 Usage:
630
631 $piddle = $rng->ran_negative_binomial_var($p_piddle, $n_piddle);
632
633 ran_pareto
634 Fills output piddle with random variates from the Pareto distribution
635 of order $pa and scale $lb.
636
637 Usage:
638
639 $piddle = $rng->ran_pareto($pa,$lb,[list of integers = output piddle dims]);
640 $rng->ran_pareto($pa,$lb,$output_piddle);
641
642 ran_pareto_var
643 Similar to ran_pareto except that it takes the distribution parameters
644 as a piddle and returns a piddle of equal dimensions.
645
646 Usage:
647
648 $piddle = $rng->ran_pareto_var($a_piddle, $b_piddle);
649
650 ran_pascal
651 Fills output piddle with random integer values from the Pascal
652 distribution. The Pascal distribution is simply a negative binomial
653 distribution (see ran_negative_binomial) with an integer value of $n.
654
655 Usage:
656
657 $piddle = $rng->ran_pascal($p,$n,[list of integers = output piddle dims]);
658 $rng->ran_pascal($p,$n,$output_piddle);
659
660 ran_pascal_var
661 Similar to ran_pascal except that it takes the distribution parameters
662 as a piddle and returns a piddle of equal dimensions.
663
664 Usage:
665
666 $piddle = $rng->ran_pascal_var($p_piddle, $n_piddle);
667
668 ran_rayleigh
669 Fills output piddle with random variates from the Rayleigh distribution
670 with scale parameter $sigma.
671
672 Usage:
673
674 $piddle = $rng->ran_rayleigh($sigma,[list of integers = output piddle dims]);
675 $rng->ran_rayleigh($sigma,$output_piddle);
676
677 ran_rayleigh_var
678 Similar to ran_rayleigh except that it takes the distribution
679 parameters as a piddle and returns a piddle of equal dimensions.
680
681 Usage:
682
683 $piddle = $rng->ran_rayleigh_var($sigma_piddle);
684
685 ran_rayleigh_tail
686 Fills output piddle with random variates from the tail of the Rayleigh
687 distribution with scale parameter $sigma and a lower limit of $la.
688
689 Usage:
690
691 $piddle = $rng->ran_rayleigh_tail($la,$sigma,[list of integers = output piddle dims]);
692 $rng->ran_rayleigh_tail($x,$sigma,$output_piddle);
693
694 ran_rayleigh_tail_var
695 Similar to ran_rayleigh_tail except that it takes the distribution
696 parameters as a piddle and returns a piddle of equal dimensions.
697
698 Usage:
699
700 $piddle = $rng->ran_rayleigh_tail_var($a_piddle, $sigma_piddle);
701
702 ran_tdist
703 Fills output piddle with random variates from the t-distribution (AKA
704 Student's t-distribution) with $nu degrees of freedom.
705
706 Usage:
707
708 $piddle = $rng->ran_tdist($nu,[list of integers = output piddle dims]);
709 $rng->ran_tdist($nu,$output_piddle);
710
711 ran_tdist_var
712 Similar to ran_tdist except that it takes the distribution parameters
713 as a piddle and returns a piddle of equal dimensions.
714
715 Usage:
716
717 $piddle = $rng->ran_tdist_var($nu_piddle);
718
719 ran_ugaussian_tail
720 Fills output piddle with random variates from the upper tail of a
721 Gaussian distribution with "standard deviation = 1" (AKA unit Gaussian
722 distribution).
723
724 Usage:
725
726 $piddle = $rng->ran_ugaussian_tail($tail,[list of integers = output piddle dims]);
727 $rng->ran_ugaussian_tail($tail,$output_piddle);
728
729 ran_ugaussian_tail_var
730 Similar to ran_ugaussian_tail except that it takes the distribution
731 parameters as a piddle and returns a piddle of equal dimensions.
732
733 Usage:
734
735 $piddle = $rng->ran_ugaussian_tail_var($tail_piddle);
736
737 ran_weibull
738 Fills output piddle with random variates from the Weibull distribution
739 with scale $pa and exponent $pb. (Some literature uses "lambda" for $pa
740 and "k" for $pb.)
741
742 Usage:
743
744 $piddle = $rng->ran_weibull($pa,$pb,[list of integers = output piddle dims]);
745 $rng->ran_weibull($pa,$pb,$output_piddle);
746
747 ran_weibull_var
748 Similar to ran_weibull except that it takes the distribution parameters
749 as a piddle and returns a piddle of equal dimensions.
750
751 Usage:
752
753 $piddle = $rng->ran_weibull_var($a_piddle, $b_piddle);
754
755 ran_dir
756 Returns $n random vectors in $ndim dimensions.
757
758 Usage:
759
760 $piddle = $rng->ran_dir($ndim,$n);
761
762 Example:
763
764 $o = $rng->ran_dir($ndim,$n);
765
766 ran_discrete_preproc
767 This method returns a handle that must be used when calling
768 ran_discrete. You specify the probability of the integer number that
769 are returned by ran_discrete.
770
771 Usage:
772
773 $discrete_dist_handle = $rng->ran_discrete_preproc($double_piddle_prob);
774
775 Example:
776
777 $prob = pdl [0.1,0.3,0.6];
778 $ddh = $rng->ran_discrete_preproc($prob);
779 $o = $rng->ran_discrete($discrete_dist_handle,100);
780
781 ran_discrete
782 Is used to get the desired samples once a proper handle has been
783 enstablished (see ran_discrete_preproc()).
784
785 Usage:
786
787 $piddle = $rng->ran_discrete($discrete_dist_handle,$num);
788
789 Example:
790
791 $prob = pdl [0.1,0.3,0.6];
792 $ddh = $rng->ran_discrete_preproc($prob);
793 $o = $rng->ran_discrete($discrete_dist_handle,100);
794
795 ran_ver
796 Returns a piddle with $n values generated by the Verhulst map from $x0
797 and parameter $r.
798
799 Usage:
800
801 $rng->ran_ver($x0, $r, $n);
802
803 ran_caos
804 Returns values from Verhuls map with "$r=4.0" and randomly chosen $x0.
805 The values are scaled by $m.
806
807 Usage:
808
809 $rng->ran_caos($m,$n);
810
812 Feedback is welcome. Log bugs in the PDL bug database (the database is
813 always linked from <http://pdl.perl.org/>).
814
816 PDL
817
818 The GSL documentation for random number distributions is online at
819 <https://www.gnu.org/software/gsl/doc/html/randist.html>
820
822 This file copyright (C) 1999 Christian Pellegrin
823 <chri@infis.univ.trieste.it> Docs mangled by C. Soeller. All rights
824 reserved. There is no warranty. You are allowed to redistribute this
825 software / documentation under certain conditions. For details, see the
826 file COPYING in the PDL distribution. If this file is separated from
827 the PDL distribution, the copyright notice should be included in the
828 file.
829
830 The GSL RNG and randist modules were written by James Theiler.
831
832
833
834perl v5.30.2 2020-04-02 RNG(3)