"Fossies" - the Fresh Open Source Software Archive

Member "PDL-2.080/GENERATED/PDL/GSL/RNG.pm" (28 May 2022, 52435 Bytes) of package /linux/misc/PDL-2.080.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "RNG.pm" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.079_vs_2.080.

    1 #
    2 # GENERATED WITH PDL::PP! Don't modify!
    3 #
    4 package PDL::GSL::RNG;
    5 
    6 our @EXPORT_OK = qw( );
    7 our %EXPORT_TAGS = (Func=>\@EXPORT_OK);
    8 
    9 use PDL::Core qw/ zeroes long barf  /;
   10 use PDL::Exporter;
   11 use DynaLoader;
   12 
   13 
   14    
   15    our @ISA = ( 'PDL::Exporter','DynaLoader' );
   16    push @PDL::Core::PP, __PACKAGE__;
   17    bootstrap PDL::GSL::RNG ;
   18 
   19 
   20 
   21 
   22 
   23 
   24 #line 9 "gsl_random.pd"
   25 
   26 use strict;
   27 use warnings;
   28 
   29 =head1 NAME
   30 
   31 PDL::GSL::RNG - PDL interface to RNG and randist routines in GSL
   32 
   33 =head1 DESCRIPTION
   34 
   35 This is an interface to the rng and randist packages present
   36 in the GNU Scientific Library.
   37 
   38 =head1 SYNOPSIS
   39 
   40    use PDL;
   41    use PDL::GSL::RNG;
   42 
   43    $rng = PDL::GSL::RNG->new('taus');
   44 
   45    $rng->set_seed(time());
   46 
   47    $x=zeroes(5,5,5)
   48 
   49    $rng->get_uniform($x); # inplace
   50 
   51    $y=$rng->get_uniform(3,4,5); # creates new pdl
   52 
   53 =head1 NOMENCLATURE
   54 
   55 Throughout this documentation we strive to use the same variables that
   56 are present in the original GSL documentation (see L<See
   57 Also|"SEE-ALSO">). Oftentimes those variables are called C<a> and
   58 C<b>. Since good Perl coding practices discourage the use of Perl
   59 variables C<$a> and C<$b>, here we refer to Parameters C<a> and C<b>
   60 as C<$pa> and C<$pb>, respectively, and Limits (of domain or
   61 integration) as C<$la> and C<$lb>.
   62 
   63 =head1 FUNCTIONS
   64 
   65 =head2 new
   66 
   67 =for ref
   68 
   69 The new method initializes a new instance of the RNG.
   70 
   71 The available RNGs are:
   72 
   73  coveyou cmrg fishman18 fishman20 fishman2x gfsr4 knuthran
   74  knuthran2 knuthran2002 lecuyer21 minstd mrg mt19937 mt19937_1999
   75  mt19937_1998 r250 ran0 ran1 ran2 ran3 rand rand48 random128_bsd
   76  random128_glibc2 random128_libc5 random256_bsd random256_glibc2
   77  random256_libc5 random32_bsd random32_glibc2 random32_libc5
   78  random64_bsd random64_glibc2 random64_libc5 random8_bsd
   79  random8_glibc2 random8_libc5 random_bsd random_glibc2
   80  random_libc5 randu ranf ranlux ranlux389 ranlxd1 ranlxd2 ranlxs0
   81  ranlxs1 ranlxs2 ranmar slatec taus taus2 taus113 transputer tt800
   82  uni uni32 vax waterman14 zuf default
   83 
   84 The last one (default) uses the environment variable GSL_RNG_TYPE.
   85 
   86 Note that only a few of these rngs are recommended for general
   87 use. Please check the GSL documentation for more information.
   88 
   89 =for usage
   90 
   91 Usage:
   92 
   93    $blessed_ref = PDL::GSL::RNG->new($RNG_name);
   94 
   95 Example:
   96 
   97 =for example
   98 
   99    $rng = PDL::GSL::RNG->new('taus');
  100 
  101 =head2 set_seed
  102 
  103 =for ref
  104 
  105 Sets the RNG seed.
  106 
  107 Usage:
  108 
  109 =for usage
  110 
  111    $rng->set_seed($integer);
  112    # or
  113    $rng = PDL::GSL::RNG->new('taus')->set_seed($integer);
  114 
  115 Example:
  116 
  117 =for example
  118 
  119    $rng->set_seed(666);
  120 
  121 =head2 min
  122 
  123 =for ref
  124 
  125 Return the minimum value generable by this RNG.
  126 
  127 Usage:
  128 
  129 =for usage
  130 
  131    $integer = $rng->min();
  132 
  133 Example:
  134 
  135 =for example
  136 
  137    $min = $rng->min(); $max = $rng->max();
  138 
  139 =head2 max
  140 
  141 =for ref
  142 
  143 Return the maximum value generable by the RNG.
  144 
  145 Usage:
  146 
  147 =for usage
  148 
  149    $integer = $rng->max();
  150 
  151 Example:
  152 
  153 =for example
  154 
  155    $min = $rng->min(); $max = $rng->max();
  156 
  157 =head2 name
  158 
  159 =for ref
  160 
  161 Returns the name of the RNG.
  162 
  163 Usage:
  164 
  165 =for usage
  166 
  167    $string = $rng->name();
  168 
  169 Example:
  170 
  171 =for example
  172 
  173    $name = $rng->name();
  174 
  175 =head2 get
  176 
  177 =for ref
  178 
  179 This function creates an ndarray with given dimensions or accepts an
  180 existing ndarray and fills it. get() returns integer values
  181 between a minimum and a maximum specific to every RNG.
  182 
  183 Usage:
  184 
  185 =for usage
  186 
  187    $ndarray = $rng->get($list_of_integers)
  188    $rng->get($ndarray);
  189 
  190 Example:
  191 
  192 =for example
  193 
  194    $x = zeroes 5,6;
  195    $o = $rng->get(10,10); $rng->get($x);
  196 
  197 =head2 get_int
  198 
  199 =for ref
  200 
  201 This function creates an ndarray with given dimensions or accepts an
  202 existing ndarray and fills it. get_int() returns integer values
  203 between 0 and $max.
  204 
  205 Usage:
  206 
  207 =for usage
  208 
  209    $ndarray = $rng->get($max, $list_of_integers)
  210    $rng->get($max, $ndarray);
  211 
  212 Example:
  213 
  214 =for example
  215 
  216    $x = zeroes 5,6; $max=100;
  217    $o = $rng->get(10,10); $rng->get($x);
  218 
  219 =head2 get_uniform
  220 
  221 =for ref
  222 
  223 This function creates an ndarray with given dimensions or accepts an
  224 existing ndarray and fills it. get_uniform() returns values 0<=x<1,
  225 
  226 Usage:
  227 
  228 =for usage
  229 
  230    $ndarray = $rng->get_uniform($list_of_integers)
  231    $rng->get_uniform($ndarray);
  232 
  233 Example:
  234 
  235 =for example
  236 
  237    $x = zeroes 5,6; $max=100;
  238    $o = $rng->get_uniform(10,10); $rng->get_uniform($x);
  239 
  240 =head2 get_uniform_pos
  241 
  242 =for ref
  243 
  244 This function creates an ndarray with given dimensions or accepts an
  245 existing ndarray and fills it. get_uniform_pos() returns values 0<x<1,
  246 
  247 Usage:
  248 
  249 =for usage
  250 
  251    $ndarray = $rng->get_uniform_pos($list_of_integers)
  252    $rng->get_uniform_pos($ndarray);
  253 
  254 Example:
  255 
  256 =for example
  257 
  258    $x = zeroes 5,6;
  259    $o = $rng->get_uniform_pos(10,10); $rng->get_uniform_pos($x);
  260 
  261 =head2 ran_shuffle
  262 
  263 =for ref
  264 
  265 Shuffles values in ndarray
  266 
  267 Usage:
  268 
  269 =for usage
  270 
  271    $rng->ran_shuffle($ndarray);
  272 
  273 =head2 ran_shuffle_vec
  274 
  275 =for ref
  276 
  277 Shuffles values in ndarray
  278 
  279 Usage:
  280 
  281 =for usage
  282 
  283    $rng->ran_shuffle_vec(@vec);
  284 
  285 =head2 ran_choose
  286 
  287 =for ref
  288 
  289 Chooses values from C<$inndarray> to C<$outndarray>.
  290 
  291 Usage:
  292 
  293 =for usage
  294 
  295    $rng->ran_choose($inndarray,$outndarray);
  296 
  297 =head2 ran_choose_vec
  298 
  299 =for ref
  300 
  301 Chooses C<$n> values from C<@vec>.
  302 
  303 Usage:
  304 
  305 =for usage
  306 
  307    @chosen = $rng->ran_choose_vec($n,@vec);
  308 
  309 =head2 ran_gaussian
  310 
  311 =for ref
  312 
  313 Fills output ndarray with random values from Gaussian distribution with mean zero and standard deviation C<$sigma>.
  314 
  315 Usage:
  316 
  317 =for usage
  318 
  319  $ndarray = $rng->ran_gaussian($sigma,[list of integers = output ndarray dims]);
  320  $rng->ran_gaussian($sigma, $output_ndarray);
  321 
  322 Example:
  323 
  324 =for example
  325 
  326   $o = $rng->ran_gaussian($sigma,10,10);
  327   $rng->ran_gaussian($sigma,$o);
  328 
  329 =head2 ran_gaussian_var
  330 
  331 =for ref
  332 
  333 This method is similar to L</ran_gaussian> except that it takes
  334 the parameters of the distribution as an ndarray and returns an ndarray of equal
  335 dimensions.
  336 
  337 Usage:
  338 
  339 =for usage
  340 
  341    $ndarray = $rng->ran_gaussian_var($sigma_ndarray);
  342    $rng->ran_gaussian_var($sigma_ndarray, $output_ndarray);
  343 
  344 Example:
  345 
  346 =for example
  347 
  348    $sigma_pdl = rvals zeroes 11,11;
  349    $o = $rng->ran_gaussian_var($sigma_pdl);
  350 
  351 =head2 ran_additive_gaussian
  352 
  353 =for ref
  354 
  355 Add Gaussian noise of given sigma to an ndarray.
  356 
  357 Usage:
  358 
  359 =for usage
  360 
  361    $rng->ran_additive_gaussian($sigma,$ndarray);
  362 
  363 Example:
  364 
  365 =for example
  366 
  367    $rng->ran_additive_gaussian(1,$image);
  368 
  369 =head2 ran_bivariate_gaussian
  370 
  371 =for ref
  372 
  373 Generates C<$n> bivariate gaussian random deviates.
  374 
  375 Usage:
  376 
  377 =for usage
  378 
  379    $ndarray = $rng->ran_bivariate_gaussian($sigma_x,$sigma_y,$rho,$n);
  380 
  381 Example:
  382 
  383 =for example
  384 
  385    $o = $rng->ran_bivariate_gaussian(1,2,0.5,1000);
  386 
  387 =head2 ran_poisson
  388 
  389 =for ref
  390 
  391 Fills output ndarray by with random integer values from the Poisson distribution with mean C<$mu>.
  392 
  393 Usage:
  394 
  395 =for usage
  396 
  397    $ndarray = $rng->ran_poisson($mu,[list of integers = output ndarray dims]);
  398    $rng->ran_poisson($mu,$output_ndarray);
  399 
  400 =head2 ran_poisson_var
  401 
  402 =for ref
  403 
  404 Similar to L</ran_poisson> except that it takes the distribution
  405 parameters as an ndarray and returns an ndarray of equal dimensions.
  406 
  407 Usage:
  408 
  409 =for usage
  410 
  411    $ndarray = $rng->ran_poisson_var($mu_ndarray);
  412 
  413 =head2 ran_additive_poisson
  414 
  415 =for ref
  416 
  417 Add Poisson noise of given C<$mu> to a C<$ndarray>.
  418 
  419 Usage:
  420 
  421 =for usage
  422 
  423    $rng->ran_additive_poisson($mu,$ndarray);
  424 
  425 Example:
  426 
  427 =for example
  428 
  429    $rng->ran_additive_poisson(1,$image);
  430 
  431 =head2 ran_feed_poisson
  432 
  433 =for ref
  434 
  435 This method simulates shot noise, taking the values of ndarray as
  436 values for C<$mu> to be fed in the poissonian RNG.
  437 
  438 Usage:
  439 
  440 =for usage
  441 
  442    $rng->ran_feed_poisson($ndarray);
  443 
  444 Example:
  445 
  446 =for example
  447 
  448    $rng->ran_feed_poisson($image);
  449 
  450 =head2 ran_bernoulli
  451 
  452 =for ref
  453 
  454 Fills output ndarray with random values 0 or 1, the result of a Bernoulli trial with probability C<$p>.
  455 
  456 Usage:
  457 
  458 =for usage
  459 
  460    $ndarray = $rng->ran_bernoulli($p,[list of integers = output ndarray dims]);
  461    $rng->ran_bernoulli($p,$output_ndarray);
  462 
  463 =head2 ran_bernoulli_var
  464 
  465 =for ref
  466 
  467 Similar to L</ran_bernoulli> except that it takes the distribution
  468 parameters as an ndarray and returns an ndarray of equal dimensions.
  469 
  470 Usage:
  471 
  472 =for usage
  473 
  474    $ndarray = $rng->ran_bernoulli_var($p_ndarray);
  475 
  476 =head2 ran_beta
  477 
  478 =for ref
  479 
  480 Fills output ndarray with random variates from the beta distribution with parameters C<$pa> and C<$pb>.
  481 
  482 Usage:
  483 
  484 =for usage
  485 
  486    $ndarray = $rng->ran_beta($pa,$pb,[list of integers = output ndarray dims]);
  487    $rng->ran_beta($pa,$pb,$output_ndarray);
  488 
  489 =head2 ran_beta_var
  490 
  491 =for ref
  492 
  493 Similar to L</ran_beta> except that it takes the distribution
  494 parameters as an ndarray and returns an ndarray of equal dimensions.
  495 
  496 Usage:
  497 
  498 =for usage
  499 
  500    $ndarray = $rng->ran_beta_var($a_ndarray, $b_ndarray);
  501 
  502 =head2 ran_binomial
  503 
  504 =for ref
  505 
  506 Fills output ndarray with random integer values from the binomial distribution, the number of
  507 successes in C<$n> independent trials with probability C<$p>.
  508 
  509 Usage:
  510 
  511 =for usage
  512 
  513    $ndarray = $rng->ran_binomial($p,$n,[list of integers = output ndarray dims]);
  514    $rng->ran_binomial($p,$n,$output_ndarray);
  515 
  516 =head2 ran_binomial_var
  517 
  518 =for ref
  519 
  520 Similar to L</ran_binomial> except that it takes the distribution
  521 parameters as an ndarray and returns an ndarray of equal dimensions.
  522 
  523 Usage:
  524 
  525 =for usage
  526 
  527    $ndarray = $rng->ran_binomial_var($p_ndarray, $n_ndarray);
  528 
  529 =head2 ran_cauchy
  530 
  531 =for ref
  532 
  533 Fills output ndarray with random variates from the Cauchy distribution with scale parameter C<$pa>.
  534 
  535 Usage:
  536 
  537 =for usage
  538 
  539    $ndarray = $rng->ran_cauchy($pa,[list of integers = output ndarray dims]);
  540    $rng->ran_cauchy($pa,$output_ndarray);
  541 
  542 =head2 ran_cauchy_var
  543 
  544 =for ref
  545 
  546 Similar to L</ran_cauchy> except that it takes the distribution
  547 parameters as an ndarray and returns an ndarray of equal dimensions.
  548 
  549 Usage:
  550 
  551 =for usage
  552 
  553    $ndarray = $rng->ran_cauchy_var($a_ndarray);
  554 
  555 =head2 ran_chisq
  556 
  557 =for ref
  558 
  559 Fills output ndarray with random variates from the chi-squared distribution with
  560 C<$nu> degrees of freedom.
  561 
  562 Usage:
  563 
  564 =for usage
  565 
  566    $ndarray = $rng->ran_chisq($nu,[list of integers = output ndarray dims]);
  567    $rng->ran_chisq($nu,$output_ndarray);
  568 
  569 =head2 ran_chisq_var
  570 
  571 =for ref
  572 
  573 Similar to L</ran_chisq> except that it takes the distribution
  574 parameters as an ndarray and returns an ndarray of equal dimensions.
  575 
  576 Usage:
  577 
  578 =for usage
  579 
  580    $ndarray = $rng->ran_chisq_var($nu_ndarray);
  581 
  582 =head2 ran_exponential
  583 
  584 =for ref
  585 
  586 Fills output ndarray with random variates from the exponential distribution with mean C<$mu>.
  587 
  588 Usage:
  589 
  590 =for usage
  591 
  592    $ndarray = $rng->ran_exponential($mu,[list of integers = output ndarray dims]);
  593    $rng->ran_exponential($mu,$output_ndarray);
  594 
  595 =head2 ran_exponential_var
  596 
  597 =for ref
  598 
  599 Similar to L</ran_exponential> except that it takes the distribution
  600 parameters as an ndarray and returns an ndarray of equal dimensions.
  601 
  602 Usage:
  603 
  604 =for usage
  605 
  606    $ndarray = $rng->ran_exponential_var($mu_ndarray);
  607 
  608 =head2 ran_exppow
  609 
  610 =for ref
  611 
  612 Fills output ndarray with random variates from the exponential power distribution with scale
  613 parameter C<$pa> and exponent C<$pb>.
  614 
  615 Usage:
  616 
  617 =for usage
  618 
  619    $ndarray = $rng->ran_exppow($pa,$pb,[list of integers = output ndarray dims]);
  620    $rng->ran_exppow($pa,$pb,$output_ndarray);
  621 
  622 =head2 ran_exppow_var
  623 
  624 =for ref
  625 
  626 Similar to L</ran_exppow> except that it takes the distribution
  627 parameters as an ndarray and returns an ndarray of equal dimensions.
  628 
  629 Usage:
  630 
  631 =for usage
  632 
  633    $ndarray = $rng->ran_exppow_var($a_ndarray, $b_ndarray);
  634 
  635 =head2 ran_fdist
  636 
  637 =for ref
  638 
  639 Fills output ndarray with random variates from the F-distribution with degrees
  640 of freedom C<$nu1> and C<$nu2>.
  641 
  642 Usage:
  643 
  644 =for usage
  645 
  646    $ndarray = $rng->ran_fdist($nu1, $nu2,[list of integers = output ndarray dims]);
  647    $rng->ran_fdist($nu1, $nu2,$output_ndarray);
  648 
  649 =head2 ran_fdist_var
  650 
  651 =for ref
  652 
  653 Similar to L</ran_fdist> except that it takes the distribution
  654 parameters as an ndarray and returns an ndarray of equal dimensions.
  655 
  656 Usage:
  657 
  658 =for usage
  659 
  660    $ndarray = $rng->ran_fdist_var($nu1_ndarray, $nu2_ndarray);
  661 
  662 =head2 ran_flat
  663 
  664 =for ref
  665 
  666 Fills output ndarray with random variates from the flat (uniform) distribution from C<$la> to C<$lb>.
  667 
  668 Usage:
  669 
  670 =for usage
  671 
  672    $ndarray = $rng->ran_flat($la,$lb,[list of integers = output ndarray dims]);
  673    $rng->ran_flat($la,$lb,$output_ndarray);
  674 
  675 =head2 ran_flat_var
  676 
  677 =for ref
  678 
  679 Similar to L</ran_flat> except that it takes the distribution
  680 parameters as an ndarray and returns an ndarray of equal dimensions.
  681 
  682 Usage:
  683 
  684 =for usage
  685 
  686    $ndarray = $rng->ran_flat_var($a_ndarray, $b_ndarray);
  687 
  688 =head2 ran_gamma
  689 
  690 =for ref
  691 
  692 Fills output ndarray with random variates from the gamma distribution.
  693 
  694 Usage:
  695 
  696 =for usage
  697 
  698    $ndarray = $rng->ran_gamma($pa,$pb,[list of integers = output ndarray dims]);
  699    $rng->ran_gamma($pa,$pb,$output_ndarray);
  700 
  701 =head2 ran_gamma_var
  702 
  703 =for ref
  704 
  705 Similar to L</ran_gamma> except that it takes the distribution
  706 parameters as an ndarray and returns an ndarray of equal dimensions.
  707 
  708 Usage:
  709 
  710 =for usage
  711 
  712    $ndarray = $rng->ran_gamma_var($a_ndarray, $b_ndarray);
  713 
  714 =head2 ran_geometric
  715 
  716 =for ref
  717 
  718 Fills output ndarray with random integer values from the geometric distribution,
  719 the number of independent trials with probability C<$p> until the first success.
  720 
  721 Usage:
  722 
  723 =for usage
  724 
  725    $ndarray = $rng->ran_geometric($p,[list of integers = output ndarray dims]);
  726    $rng->ran_geometric($p,$output_ndarray);
  727 
  728 =head2 ran_geometric_var
  729 
  730 =for ref
  731 
  732 Similar to L</ran_geometric> except that it takes the distribution
  733 parameters as an ndarray and returns an ndarray of equal dimensions.
  734 
  735 Usage:
  736 
  737 =for usage
  738 
  739    $ndarray = $rng->ran_geometric_var($p_ndarray);
  740 
  741 =head2 ran_gumbel1
  742 
  743 =for ref
  744 
  745 Fills output ndarray with random variates from the Type-1 Gumbel distribution.
  746 
  747 Usage:
  748 
  749 =for usage
  750 
  751    $ndarray = $rng->ran_gumbel1($pa,$pb,[list of integers = output ndarray dims]);
  752    $rng->ran_gumbel1($pa,$pb,$output_ndarray);
  753 
  754 =head2 ran_gumbel1_var
  755 
  756 =for ref
  757 
  758 Similar to L</ran_gumbel1> except that it takes the distribution
  759 parameters as an ndarray and returns an ndarray of equal dimensions.
  760 
  761 Usage:
  762 
  763 =for usage
  764 
  765    $ndarray = $rng->ran_gumbel1_var($a_ndarray, $b_ndarray);
  766 
  767 =head2 ran_gumbel2
  768 
  769 =for ref
  770 
  771 Fills output ndarray with random variates from the Type-2 Gumbel distribution.
  772 
  773 Usage:
  774 
  775 =for usage
  776 
  777    $ndarray = $rng->ran_gumbel2($pa,$pb,[list of integers = output ndarray dims]);
  778    $rng->ran_gumbel2($pa,$pb,$output_ndarray);
  779 
  780 =head2 ran_gumbel2_var
  781 
  782 =for ref
  783 
  784 Similar to L</ran_gumbel2> except that it takes the distribution
  785 parameters as an ndarray and returns an ndarray of equal dimensions.
  786 
  787 Usage:
  788 
  789 =for usage
  790 
  791    $ndarray = $rng->ran_gumbel2_var($a_ndarray, $b_ndarray);
  792 
  793 =head2 ran_hypergeometric
  794 
  795 =for ref
  796 
  797 Fills output ndarray with random integer values from the hypergeometric distribution.
  798 If a population contains C<$n1> elements of type 1 and C<$n2> elements of
  799 type 2 then the hypergeometric distribution gives the probability of obtaining
  800 C<$x> elements of type 1 in C<$t> samples from the population without replacement.
  801 
  802 Usage:
  803 
  804 =for usage
  805 
  806    $ndarray = $rng->ran_hypergeometric($n1, $n2, $t,[list of integers = output ndarray dims]);
  807    $rng->ran_hypergeometric($n1, $n2, $t,$output_ndarray);
  808 
  809 =head2 ran_hypergeometric_var
  810 
  811 =for ref
  812 
  813 Similar to L</ran_hypergeometric> except that it takes the distribution
  814 parameters as an ndarray and returns an ndarray of equal dimensions.
  815 
  816 Usage:
  817 
  818 =for usage
  819 
  820    $ndarray = $rng->ran_hypergeometric_var($n1_ndarray, $n2_ndarray, $t_ndarray);
  821 
  822 =head2 ran_laplace
  823 
  824 =for ref
  825 
  826 Fills output ndarray with random variates from the Laplace distribution with width C<$pa>.
  827 
  828 Usage:
  829 
  830 =for usage
  831 
  832    $ndarray = $rng->ran_laplace($pa,[list of integers = output ndarray dims]);
  833    $rng->ran_laplace($pa,$output_ndarray);
  834 
  835 =head2 ran_laplace_var
  836 
  837 =for ref
  838 
  839 Similar to L</ran_laplace> except that it takes the distribution
  840 parameters as an ndarray and returns an ndarray of equal dimensions.
  841 
  842 Usage:
  843 
  844 =for usage
  845 
  846    $ndarray = $rng->ran_laplace_var($a_ndarray);
  847 
  848 =head2 ran_levy
  849 
  850 =for ref
  851 
  852 Fills output ndarray with random variates from the Levy symmetric stable
  853 distribution with scale C<$c> and exponent C<$alpha>.
  854 
  855 Usage:
  856 
  857 =for usage
  858 
  859    $ndarray = $rng->ran_levy($mu,$x,[list of integers = output ndarray dims]);
  860    $rng->ran_levy($mu,$x,$output_ndarray);
  861 
  862 =head2 ran_levy_var
  863 
  864 =for ref
  865 
  866 Similar to L</ran_levy> except that it takes the distribution
  867 parameters as an ndarray and returns an ndarray of equal dimensions.
  868 
  869 Usage:
  870 
  871 =for usage
  872 
  873    $ndarray = $rng->ran_levy_var($mu_ndarray, $a_ndarray);
  874 
  875 =head2 ran_logarithmic
  876 
  877 =for ref
  878 
  879 Fills output ndarray with random integer values from the logarithmic distribution.
  880 
  881 Usage:
  882 
  883 =for usage
  884 
  885    $ndarray = $rng->ran_logarithmic($p,[list of integers = output ndarray dims]);
  886    $rng->ran_logarithmic($p,$output_ndarray);
  887 
  888 =head2 ran_logarithmic_var
  889 
  890 =for ref
  891 
  892 Similar to L</ran_logarithmic> except that it takes the distribution
  893 parameters as an ndarray and returns an ndarray of equal dimensions.
  894 
  895 Usage:
  896 
  897 =for usage
  898 
  899    $ndarray = $rng->ran_logarithmic_var($p_ndarray);
  900 
  901 =head2 ran_logistic
  902 
  903 =for ref
  904 
  905 Fills output ndarray with random random variates from the logistic distribution.
  906 
  907 Usage:
  908 
  909 =for usage
  910 
  911    $ndarray = $rng->ran_logistic($m,[list of integers = output ndarray dims]u)
  912    $rng->ran_logistic($m,$output_ndarray)
  913 
  914 =head2 ran_logistic_var
  915 
  916 =for ref
  917 
  918 Similar to L</ran_logistic> except that it takes the distribution
  919 parameters as an ndarray and returns an ndarray of equal dimensions.
  920 
  921 Usage:
  922 
  923 =for usage
  924 
  925    $ndarray = $rng->ran_logistic_var($m_ndarray);
  926 
  927 =head2 ran_lognormal
  928 
  929 =for ref
  930 
  931 Fills output ndarray with random variates from the lognormal distribution with
  932 parameters C<$mu> (location) and C<$sigma> (scale).
  933 
  934 Usage:
  935 
  936 =for usage
  937 
  938    $ndarray = $rng->ran_lognormal($mu,$sigma,[list of integers = output ndarray dims]);
  939    $rng->ran_lognormal($mu,$sigma,$output_ndarray);
  940 
  941 =head2 ran_lognormal_var
  942 
  943 =for ref
  944 
  945 Similar to L</ran_lognormal> except that it takes the distribution
  946 parameters as an ndarray and returns an ndarray of equal dimensions.
  947 
  948 Usage:
  949 
  950 =for usage
  951 
  952    $ndarray = $rng->ran_lognormal_var($mu_ndarray, $sigma_ndarray);
  953 
  954 =head2 ran_negative_binomial
  955 
  956 =for ref
  957 
  958 Fills output ndarray with random integer values from the negative binomial
  959 distribution, the number of failures occurring before C<$n> successes in
  960 independent trials with probability C<$p> of success. Note that C<$n> is
  961 not required to be an integer.
  962 
  963 Usage:
  964 
  965 =for usage
  966 
  967    $ndarray = $rng->ran_negative_binomial($p,$n,[list of integers = output ndarray dims]);
  968    $rng->ran_negative_binomial($p,$n,$output_ndarray);
  969 
  970 =head2 ran_negative_binomial_var
  971 
  972 =for ref
  973 
  974 Similar to L</ran_negative_binomial> except that it takes the distribution
  975 parameters as an ndarray and returns an ndarray of equal dimensions.
  976 
  977 Usage:
  978 
  979 =for usage
  980 
  981    $ndarray = $rng->ran_negative_binomial_var($p_ndarray, $n_ndarray);
  982 
  983 =head2 ran_pareto
  984 
  985 =for ref
  986 
  987 Fills output ndarray with random variates from the Pareto distribution of
  988 order C<$pa> and scale C<$lb>.
  989 
  990 Usage:
  991 
  992 =for usage
  993 
  994    $ndarray = $rng->ran_pareto($pa,$lb,[list of integers = output ndarray dims]);
  995    $rng->ran_pareto($pa,$lb,$output_ndarray);
  996 
  997 =head2 ran_pareto_var
  998 
  999 =for ref
 1000 
 1001 Similar to L</ran_pareto> except that it takes the distribution
 1002 parameters as an ndarray and returns an ndarray of equal dimensions.
 1003 
 1004 Usage:
 1005 
 1006 =for usage
 1007 
 1008    $ndarray = $rng->ran_pareto_var($a_ndarray, $b_ndarray);
 1009 
 1010 =head2 ran_pascal
 1011 
 1012 =for ref
 1013 
 1014 Fills output ndarray with random integer values from the Pascal distribution.
 1015 The Pascal distribution is simply a negative binomial distribution
 1016 (see L</ran_negative_binomial>) with an integer value of C<$n>.
 1017 
 1018 Usage:
 1019 
 1020 =for usage
 1021 
 1022    $ndarray = $rng->ran_pascal($p,$n,[list of integers = output ndarray dims]);
 1023    $rng->ran_pascal($p,$n,$output_ndarray);
 1024 
 1025 =head2 ran_pascal_var
 1026 
 1027 =for ref
 1028 
 1029 Similar to L</ran_pascal> except that it takes the distribution
 1030 parameters as an ndarray and returns an ndarray of equal dimensions.
 1031 
 1032 Usage:
 1033 
 1034 =for usage
 1035 
 1036    $ndarray = $rng->ran_pascal_var($p_ndarray, $n_ndarray);
 1037 
 1038 =head2 ran_rayleigh
 1039 
 1040 =for ref
 1041 
 1042 Fills output ndarray with random variates from the Rayleigh distribution with scale parameter C<$sigma>.
 1043 
 1044 Usage:
 1045 
 1046 =for usage
 1047 
 1048    $ndarray = $rng->ran_rayleigh($sigma,[list of integers = output ndarray dims]);
 1049    $rng->ran_rayleigh($sigma,$output_ndarray);
 1050 
 1051 =head2 ran_rayleigh_var
 1052 
 1053 =for ref
 1054 
 1055 Similar to L</ran_rayleigh> except that it takes the distribution
 1056 parameters as an ndarray and returns an ndarray of equal dimensions.
 1057 
 1058 Usage:
 1059 
 1060 =for usage
 1061 
 1062    $ndarray = $rng->ran_rayleigh_var($sigma_ndarray);
 1063 
 1064 =head2 ran_rayleigh_tail
 1065 
 1066 =for ref
 1067 
 1068 Fills output ndarray with random variates from the tail of the Rayleigh distribution
 1069 with scale parameter C<$sigma> and a lower limit of C<$la>.
 1070 
 1071 Usage:
 1072 
 1073 =for usage
 1074 
 1075    $ndarray = $rng->ran_rayleigh_tail($la,$sigma,[list of integers = output ndarray dims]);
 1076    $rng->ran_rayleigh_tail($x,$sigma,$output_ndarray);
 1077 
 1078 =head2 ran_rayleigh_tail_var
 1079 
 1080 =for ref
 1081 
 1082 Similar to L</ran_rayleigh_tail> except that it takes the distribution
 1083 parameters as an ndarray and returns an ndarray of equal dimensions.
 1084 
 1085 Usage:
 1086 
 1087 =for usage
 1088 
 1089    $ndarray = $rng->ran_rayleigh_tail_var($a_ndarray, $sigma_ndarray);
 1090 
 1091 =head2 ran_tdist
 1092 
 1093 =for ref
 1094 
 1095 Fills output ndarray with random variates from the t-distribution (AKA Student's
 1096 t-distribution) with C<$nu> degrees of freedom.
 1097 
 1098 Usage:
 1099 
 1100 =for usage
 1101 
 1102    $ndarray = $rng->ran_tdist($nu,[list of integers = output ndarray dims]);
 1103    $rng->ran_tdist($nu,$output_ndarray);
 1104 
 1105 =head2 ran_tdist_var
 1106 
 1107 =for ref
 1108 
 1109 Similar to L</ran_tdist> except that it takes the distribution
 1110 parameters as an ndarray and returns an ndarray of equal dimensions.
 1111 
 1112 Usage:
 1113 
 1114 =for usage
 1115 
 1116    $ndarray = $rng->ran_tdist_var($nu_ndarray);
 1117 
 1118 =head2 ran_ugaussian_tail
 1119 
 1120 =for ref
 1121 
 1122 Fills output ndarray with random variates from the upper tail of a Gaussian
 1123 distribution with C<standard deviation = 1> (AKA unit Gaussian distribution).
 1124 
 1125 Usage:
 1126 
 1127 =for usage
 1128 
 1129    $ndarray = $rng->ran_ugaussian_tail($tail,[list of integers = output ndarray dims]);
 1130    $rng->ran_ugaussian_tail($tail,$output_ndarray);
 1131 
 1132 =head2 ran_ugaussian_tail_var
 1133 
 1134 =for ref
 1135 
 1136 Similar to L</ran_ugaussian_tail> except that it takes the distribution
 1137 parameters as an ndarray and returns an ndarray of equal dimensions.
 1138 
 1139 Usage:
 1140 
 1141 =for usage
 1142 
 1143    $ndarray = $rng->ran_ugaussian_tail_var($tail_ndarray);
 1144 
 1145 =head2 ran_weibull
 1146 
 1147 =for ref
 1148 
 1149 Fills output ndarray with random variates from the Weibull distribution with scale C<$pa> and exponent C<$pb>. (Some literature uses C<lambda> for C<$pa> and C<k> for C<$pb>.)
 1150 
 1151 Usage:
 1152 
 1153 =for usage
 1154 
 1155    $ndarray = $rng->ran_weibull($pa,$pb,[list of integers = output ndarray dims]);
 1156    $rng->ran_weibull($pa,$pb,$output_ndarray);
 1157 
 1158 =head2 ran_weibull_var
 1159 
 1160 =for ref
 1161 
 1162 Similar to L</ran_weibull> except that it takes the distribution
 1163 parameters as an ndarray and returns an ndarray of equal dimensions.
 1164 
 1165 Usage:
 1166 
 1167 =for usage
 1168 
 1169    $ndarray = $rng->ran_weibull_var($a_ndarray, $b_ndarray);
 1170 
 1171 =head2 ran_dir
 1172 
 1173 =for ref
 1174 
 1175 Returns C<$n> random vectors in C<$ndim> dimensions.
 1176 
 1177 Usage:
 1178 
 1179 =for usage
 1180 
 1181    $ndarray = $rng->ran_dir($ndim,$n);
 1182 
 1183 Example:
 1184 
 1185 =for example
 1186 
 1187    $o = $rng->ran_dir($ndim,$n);
 1188 
 1189 =head2 ran_discrete_preproc
 1190 
 1191 =for ref
 1192 
 1193 This method returns a handle that must be used when calling
 1194 L</ran_discrete>. You specify the probability of the integer number
 1195 that are returned by L</ran_discrete>.
 1196 
 1197 Usage:
 1198 
 1199 =for usage
 1200 
 1201    $discrete_dist_handle = $rng->ran_discrete_preproc($double_ndarray_prob);
 1202 
 1203 Example:
 1204 
 1205 =for example
 1206 
 1207    $prob = pdl [0.1,0.3,0.6];
 1208    $ddh = $rng->ran_discrete_preproc($prob);
 1209    $o = $rng->ran_discrete($discrete_dist_handle,100);
 1210 
 1211 =head2 ran_discrete
 1212 
 1213 =for ref
 1214 
 1215 Is used to get the desired samples once a proper handle has been
 1216 enstablished (see ran_discrete_preproc()).
 1217 
 1218 Usage:
 1219 
 1220 =for usage
 1221 
 1222    $ndarray = $rng->ran_discrete($discrete_dist_handle,$num);
 1223 
 1224 Example:
 1225 
 1226 =for example
 1227 
 1228    $prob = pdl [0.1,0.3,0.6];
 1229    $ddh = $rng->ran_discrete_preproc($prob);
 1230    $o = $rng->ran_discrete($discrete_dist_handle,100);
 1231 
 1232 =head2 ran_ver
 1233 
 1234 =for ref
 1235 
 1236 Returns an ndarray with C<$n> values generated by the Verhulst map from C<$x0> and
 1237 parameter C<$r>.
 1238 
 1239 Usage:
 1240 
 1241 =for usage
 1242 
 1243    $rng->ran_ver($x0, $r, $n);
 1244 
 1245 =head2 ran_caos
 1246 
 1247 =for ref
 1248 
 1249 Returns values from Verhuls map with C<$r=4.0> and randomly chosen
 1250 C<$x0>. The values are scaled by C<$m>.
 1251 
 1252 Usage:
 1253 
 1254 =for usage
 1255 
 1256    $rng->ran_caos($m,$n);
 1257 
 1258 =head1 BUGS
 1259 
 1260 Feedback is welcome. Log bugs in the PDL bug database (the
 1261 database is always linked from L<http://pdl.perl.org/>).
 1262 
 1263 =head1 SEE ALSO
 1264 
 1265 L<PDL>
 1266 
 1267 The GSL documentation for random number distributions is online at
 1268 L<https://www.gnu.org/software/gsl/doc/html/randist.html>
 1269 
 1270 =head1 AUTHOR
 1271 
 1272 This file copyright (C) 1999 Christian Pellegrin <chri@infis.univ.trieste.it>
 1273 Docs mangled by C. Soeller. All rights reserved. There
 1274 is no warranty. You are allowed to redistribute this software /
 1275 documentation under certain conditions. For details, see the file
 1276 COPYING in the PDL distribution. If this file is separated from the
 1277 PDL distribution, the copyright notice should be included in the file.
 1278 
 1279 The GSL RNG and randist modules were written by James Theiler.
 1280 
 1281 =cut
 1282 #line 1283 "RNG.pm"
 1283 
 1284 
 1285 
 1286 
 1287 
 1288 
 1289 
 1290 #line 1309 "gsl_random.pd"
 1291 
 1292 
 1293 use strict;
 1294 
 1295 # PDL::GSL::RNG::nullcreate just creates a null PDL. Used
 1296 #  for the GSL functions that create PDLs
 1297 sub nullcreate{
 1298 
 1299     my ($type,$arg) = @_;
 1300 
 1301     PDL->nullcreate($arg);
 1302 }
 1303 #line 1304 "RNG.pm"
 1304 
 1305 
 1306 
 1307 #line 1323 "gsl_random.pd"
 1308 
 1309 
 1310 sub get_uniform {
 1311 my ($obj,@var) = @_;if (ref($var[0]) eq 'PDL') {
 1312     gsl_get_uniform_meat($var[0],$$obj);
 1313     return $var[0];
 1314 }
 1315 else {
 1316     my $p;
 1317 
 1318     $p = zeroes @var;
 1319     gsl_get_uniform_meat($p,$$obj);
 1320     return $p;
 1321 }
 1322 }
 1323 #line 1324 "RNG.pm"
 1324 
 1325 
 1326 
 1327 #line 1324 "gsl_random.pd"
 1328 
 1329 
 1330 sub get_uniform_pos {
 1331 my ($obj,@var) = @_;if (ref($var[0]) eq 'PDL') {
 1332     gsl_get_uniform_pos_meat($var[0],$$obj);
 1333     return $var[0];
 1334 }
 1335 else {
 1336     my $p;
 1337 
 1338     $p = zeroes @var;
 1339     gsl_get_uniform_pos_meat($p,$$obj);
 1340     return $p;
 1341 }
 1342 }
 1343 #line 1344 "RNG.pm"
 1344 
 1345 
 1346 
 1347 #line 1325 "gsl_random.pd"
 1348 
 1349 
 1350 sub get {
 1351 my ($obj,@var) = @_;if (ref($var[0]) eq 'PDL') {
 1352     gsl_get_meat($var[0],$$obj);
 1353     return $var[0];
 1354 }
 1355 else {
 1356     my $p;
 1357 
 1358     $p = zeroes @var;
 1359     gsl_get_meat($p,$$obj);
 1360     return $p;
 1361 }
 1362 }
 1363 #line 1364 "RNG.pm"
 1364 
 1365 
 1366 
 1367 #line 1326 "gsl_random.pd"
 1368 
 1369 
 1370 sub get_int {
 1371 my ($obj,$n,@var) = @_;if (!($n>0)) {barf("first parameter must be an int >0")};if (ref($var[0]) eq 'PDL') {
 1372     gsl_get_int_meat($var[0],$n,$$obj);
 1373     return $var[0];
 1374 }
 1375 else {
 1376     my $p;
 1377 
 1378     $p = zeroes @var;
 1379     gsl_get_int_meat($p,$n,$$obj);
 1380     return $p;
 1381 }
 1382 }
 1383 #line 1384 "RNG.pm"
 1384 
 1385 
 1386 
 1387 #line 950 "../../../blib/lib/PDL/PP.pm"
 1388 
 1389 *gsl_get_uniform_meat = \&PDL::GSL::RNG::gsl_get_uniform_meat;
 1390 #line 1391 "RNG.pm"
 1391 
 1392 
 1393 
 1394 #line 950 "../../../blib/lib/PDL/PP.pm"
 1395 
 1396 *gsl_get_uniform_pos_meat = \&PDL::GSL::RNG::gsl_get_uniform_pos_meat;
 1397 #line 1398 "RNG.pm"
 1398 
 1399 
 1400 
 1401 #line 950 "../../../blib/lib/PDL/PP.pm"
 1402 
 1403 *gsl_get_meat = \&PDL::GSL::RNG::gsl_get_meat;
 1404 #line 1405 "RNG.pm"
 1405 
 1406 
 1407 
 1408 #line 950 "../../../blib/lib/PDL/PP.pm"
 1409 
 1410 *gsl_get_int_meat = \&PDL::GSL::RNG::gsl_get_int_meat;
 1411 #line 1412 "RNG.pm"
 1412 
 1413 
 1414 
 1415 #line 950 "../../../blib/lib/PDL/PP.pm"
 1416 
 1417 *ran_gaussian_meat = \&PDL::GSL::RNG::ran_gaussian_meat;
 1418 #line 1419 "RNG.pm"
 1419 
 1420 
 1421 
 1422 #line 1407 "gsl_random.pd"
 1423 
 1424 
 1425 sub ran_gaussian {
 1426 my ($obj,$a,@var) = @_;
 1427 if (ref($var[0]) eq 'PDL') {
 1428     ran_gaussian_meat($var[0],$a,$$obj);
 1429     return $var[0];
 1430 }
 1431 else {
 1432     my $p;
 1433 
 1434     $p = zeroes @var;
 1435     ran_gaussian_meat($p,$a,$$obj);
 1436     return $p;
 1437 }
 1438 }
 1439 #line 1440 "RNG.pm"
 1440 
 1441 
 1442 
 1443 #line 950 "../../../blib/lib/PDL/PP.pm"
 1444 
 1445 *ran_gaussian_var_meat = \&PDL::GSL::RNG::ran_gaussian_var_meat;
 1446 #line 1447 "RNG.pm"
 1447 
 1448 
 1449 
 1450 #line 1431 "gsl_random.pd"
 1451 
 1452 
 1453 sub ran_gaussian_var {
 1454 my ($obj,@var) = @_;
 1455     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 1456     return ran_gaussian_var_meat(@var,$$obj);
 1457 }
 1458 #line 1459 "RNG.pm"
 1459 
 1460 
 1461 
 1462 #line 950 "../../../blib/lib/PDL/PP.pm"
 1463 
 1464 *ran_ugaussian_tail_meat = \&PDL::GSL::RNG::ran_ugaussian_tail_meat;
 1465 #line 1466 "RNG.pm"
 1466 
 1467 
 1468 
 1469 #line 1407 "gsl_random.pd"
 1470 
 1471 
 1472 sub ran_ugaussian_tail {
 1473 my ($obj,$a,@var) = @_;
 1474 if (ref($var[0]) eq 'PDL') {
 1475     ran_ugaussian_tail_meat($var[0],$a,$$obj);
 1476     return $var[0];
 1477 }
 1478 else {
 1479     my $p;
 1480 
 1481     $p = zeroes @var;
 1482     ran_ugaussian_tail_meat($p,$a,$$obj);
 1483     return $p;
 1484 }
 1485 }
 1486 #line 1487 "RNG.pm"
 1487 
 1488 
 1489 
 1490 #line 950 "../../../blib/lib/PDL/PP.pm"
 1491 
 1492 *ran_ugaussian_tail_var_meat = \&PDL::GSL::RNG::ran_ugaussian_tail_var_meat;
 1493 #line 1494 "RNG.pm"
 1494 
 1495 
 1496 
 1497 #line 1431 "gsl_random.pd"
 1498 
 1499 
 1500 sub ran_ugaussian_tail_var {
 1501 my ($obj,@var) = @_;
 1502     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 1503     return ran_ugaussian_tail_var_meat(@var,$$obj);
 1504 }
 1505 #line 1506 "RNG.pm"
 1506 
 1507 
 1508 
 1509 #line 950 "../../../blib/lib/PDL/PP.pm"
 1510 
 1511 *ran_exponential_meat = \&PDL::GSL::RNG::ran_exponential_meat;
 1512 #line 1513 "RNG.pm"
 1513 
 1514 
 1515 
 1516 #line 1407 "gsl_random.pd"
 1517 
 1518 
 1519 sub ran_exponential {
 1520 my ($obj,$a,@var) = @_;
 1521 if (ref($var[0]) eq 'PDL') {
 1522     ran_exponential_meat($var[0],$a,$$obj);
 1523     return $var[0];
 1524 }
 1525 else {
 1526     my $p;
 1527 
 1528     $p = zeroes @var;
 1529     ran_exponential_meat($p,$a,$$obj);
 1530     return $p;
 1531 }
 1532 }
 1533 #line 1534 "RNG.pm"
 1534 
 1535 
 1536 
 1537 #line 950 "../../../blib/lib/PDL/PP.pm"
 1538 
 1539 *ran_exponential_var_meat = \&PDL::GSL::RNG::ran_exponential_var_meat;
 1540 #line 1541 "RNG.pm"
 1541 
 1542 
 1543 
 1544 #line 1431 "gsl_random.pd"
 1545 
 1546 
 1547 sub ran_exponential_var {
 1548 my ($obj,@var) = @_;
 1549     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 1550     return ran_exponential_var_meat(@var,$$obj);
 1551 }
 1552 #line 1553 "RNG.pm"
 1553 
 1554 
 1555 
 1556 #line 950 "../../../blib/lib/PDL/PP.pm"
 1557 
 1558 *ran_laplace_meat = \&PDL::GSL::RNG::ran_laplace_meat;
 1559 #line 1560 "RNG.pm"
 1560 
 1561 
 1562 
 1563 #line 1407 "gsl_random.pd"
 1564 
 1565 
 1566 sub ran_laplace {
 1567 my ($obj,$a,@var) = @_;
 1568 if (ref($var[0]) eq 'PDL') {
 1569     ran_laplace_meat($var[0],$a,$$obj);
 1570     return $var[0];
 1571 }
 1572 else {
 1573     my $p;
 1574 
 1575     $p = zeroes @var;
 1576     ran_laplace_meat($p,$a,$$obj);
 1577     return $p;
 1578 }
 1579 }
 1580 #line 1581 "RNG.pm"
 1581 
 1582 
 1583 
 1584 #line 950 "../../../blib/lib/PDL/PP.pm"
 1585 
 1586 *ran_laplace_var_meat = \&PDL::GSL::RNG::ran_laplace_var_meat;
 1587 #line 1588 "RNG.pm"
 1588 
 1589 
 1590 
 1591 #line 1431 "gsl_random.pd"
 1592 
 1593 
 1594 sub ran_laplace_var {
 1595 my ($obj,@var) = @_;
 1596     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 1597     return ran_laplace_var_meat(@var,$$obj);
 1598 }
 1599 #line 1600 "RNG.pm"
 1600 
 1601 
 1602 
 1603 #line 950 "../../../blib/lib/PDL/PP.pm"
 1604 
 1605 *ran_exppow_meat = \&PDL::GSL::RNG::ran_exppow_meat;
 1606 #line 1607 "RNG.pm"
 1607 
 1608 
 1609 
 1610 #line 1407 "gsl_random.pd"
 1611 
 1612 
 1613 sub ran_exppow {
 1614 my ($obj,$a,$b,@var) = @_;
 1615 if (ref($var[0]) eq 'PDL') {
 1616     ran_exppow_meat($var[0],$a,$b,$$obj);
 1617     return $var[0];
 1618 }
 1619 else {
 1620     my $p;
 1621 
 1622     $p = zeroes @var;
 1623     ran_exppow_meat($p,$a,$b,$$obj);
 1624     return $p;
 1625 }
 1626 }
 1627 #line 1628 "RNG.pm"
 1628 
 1629 
 1630 
 1631 #line 950 "../../../blib/lib/PDL/PP.pm"
 1632 
 1633 *ran_exppow_var_meat = \&PDL::GSL::RNG::ran_exppow_var_meat;
 1634 #line 1635 "RNG.pm"
 1635 
 1636 
 1637 
 1638 #line 1431 "gsl_random.pd"
 1639 
 1640 
 1641 sub ran_exppow_var {
 1642 my ($obj,@var) = @_;
 1643     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 1644     return ran_exppow_var_meat(@var,$$obj);
 1645 }
 1646 #line 1647 "RNG.pm"
 1647 
 1648 
 1649 
 1650 #line 950 "../../../blib/lib/PDL/PP.pm"
 1651 
 1652 *ran_cauchy_meat = \&PDL::GSL::RNG::ran_cauchy_meat;
 1653 #line 1654 "RNG.pm"
 1654 
 1655 
 1656 
 1657 #line 1407 "gsl_random.pd"
 1658 
 1659 
 1660 sub ran_cauchy {
 1661 my ($obj,$a,@var) = @_;
 1662 if (ref($var[0]) eq 'PDL') {
 1663     ran_cauchy_meat($var[0],$a,$$obj);
 1664     return $var[0];
 1665 }
 1666 else {
 1667     my $p;
 1668 
 1669     $p = zeroes @var;
 1670     ran_cauchy_meat($p,$a,$$obj);
 1671     return $p;
 1672 }
 1673 }
 1674 #line 1675 "RNG.pm"
 1675 
 1676 
 1677 
 1678 #line 950 "../../../blib/lib/PDL/PP.pm"
 1679 
 1680 *ran_cauchy_var_meat = \&PDL::GSL::RNG::ran_cauchy_var_meat;
 1681 #line 1682 "RNG.pm"
 1682 
 1683 
 1684 
 1685 #line 1431 "gsl_random.pd"
 1686 
 1687 
 1688 sub ran_cauchy_var {
 1689 my ($obj,@var) = @_;
 1690     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 1691     return ran_cauchy_var_meat(@var,$$obj);
 1692 }
 1693 #line 1694 "RNG.pm"
 1694 
 1695 
 1696 
 1697 #line 950 "../../../blib/lib/PDL/PP.pm"
 1698 
 1699 *ran_rayleigh_meat = \&PDL::GSL::RNG::ran_rayleigh_meat;
 1700 #line 1701 "RNG.pm"
 1701 
 1702 
 1703 
 1704 #line 1407 "gsl_random.pd"
 1705 
 1706 
 1707 sub ran_rayleigh {
 1708 my ($obj,$a,@var) = @_;
 1709 if (ref($var[0]) eq 'PDL') {
 1710     ran_rayleigh_meat($var[0],$a,$$obj);
 1711     return $var[0];
 1712 }
 1713 else {
 1714     my $p;
 1715 
 1716     $p = zeroes @var;
 1717     ran_rayleigh_meat($p,$a,$$obj);
 1718     return $p;
 1719 }
 1720 }
 1721 #line 1722 "RNG.pm"
 1722 
 1723 
 1724 
 1725 #line 950 "../../../blib/lib/PDL/PP.pm"
 1726 
 1727 *ran_rayleigh_var_meat = \&PDL::GSL::RNG::ran_rayleigh_var_meat;
 1728 #line 1729 "RNG.pm"
 1729 
 1730 
 1731 
 1732 #line 1431 "gsl_random.pd"
 1733 
 1734 
 1735 sub ran_rayleigh_var {
 1736 my ($obj,@var) = @_;
 1737     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 1738     return ran_rayleigh_var_meat(@var,$$obj);
 1739 }
 1740 #line 1741 "RNG.pm"
 1741 
 1742 
 1743 
 1744 #line 950 "../../../blib/lib/PDL/PP.pm"
 1745 
 1746 *ran_rayleigh_tail_meat = \&PDL::GSL::RNG::ran_rayleigh_tail_meat;
 1747 #line 1748 "RNG.pm"
 1748 
 1749 
 1750 
 1751 #line 1407 "gsl_random.pd"
 1752 
 1753 
 1754 sub ran_rayleigh_tail {
 1755 my ($obj,$a,$b,@var) = @_;
 1756 if (ref($var[0]) eq 'PDL') {
 1757     ran_rayleigh_tail_meat($var[0],$a,$b,$$obj);
 1758     return $var[0];
 1759 }
 1760 else {
 1761     my $p;
 1762 
 1763     $p = zeroes @var;
 1764     ran_rayleigh_tail_meat($p,$a,$b,$$obj);
 1765     return $p;
 1766 }
 1767 }
 1768 #line 1769 "RNG.pm"
 1769 
 1770 
 1771 
 1772 #line 950 "../../../blib/lib/PDL/PP.pm"
 1773 
 1774 *ran_rayleigh_tail_var_meat = \&PDL::GSL::RNG::ran_rayleigh_tail_var_meat;
 1775 #line 1776 "RNG.pm"
 1776 
 1777 
 1778 
 1779 #line 1431 "gsl_random.pd"
 1780 
 1781 
 1782 sub ran_rayleigh_tail_var {
 1783 my ($obj,@var) = @_;
 1784     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 1785     return ran_rayleigh_tail_var_meat(@var,$$obj);
 1786 }
 1787 #line 1788 "RNG.pm"
 1788 
 1789 
 1790 
 1791 #line 950 "../../../blib/lib/PDL/PP.pm"
 1792 
 1793 *ran_levy_meat = \&PDL::GSL::RNG::ran_levy_meat;
 1794 #line 1795 "RNG.pm"
 1795 
 1796 
 1797 
 1798 #line 1407 "gsl_random.pd"
 1799 
 1800 
 1801 sub ran_levy {
 1802 my ($obj,$a,$b,@var) = @_;
 1803 if (ref($var[0]) eq 'PDL') {
 1804     ran_levy_meat($var[0],$a,$b,$$obj);
 1805     return $var[0];
 1806 }
 1807 else {
 1808     my $p;
 1809 
 1810     $p = zeroes @var;
 1811     ran_levy_meat($p,$a,$b,$$obj);
 1812     return $p;
 1813 }
 1814 }
 1815 #line 1816 "RNG.pm"
 1816 
 1817 
 1818 
 1819 #line 950 "../../../blib/lib/PDL/PP.pm"
 1820 
 1821 *ran_levy_var_meat = \&PDL::GSL::RNG::ran_levy_var_meat;
 1822 #line 1823 "RNG.pm"
 1823 
 1824 
 1825 
 1826 #line 1431 "gsl_random.pd"
 1827 
 1828 
 1829 sub ran_levy_var {
 1830 my ($obj,@var) = @_;
 1831     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 1832     return ran_levy_var_meat(@var,$$obj);
 1833 }
 1834 #line 1835 "RNG.pm"
 1835 
 1836 
 1837 
 1838 #line 950 "../../../blib/lib/PDL/PP.pm"
 1839 
 1840 *ran_gamma_meat = \&PDL::GSL::RNG::ran_gamma_meat;
 1841 #line 1842 "RNG.pm"
 1842 
 1843 
 1844 
 1845 #line 1407 "gsl_random.pd"
 1846 
 1847 
 1848 sub ran_gamma {
 1849 my ($obj,$a,$b,@var) = @_;
 1850 if (ref($var[0]) eq 'PDL') {
 1851     ran_gamma_meat($var[0],$a,$b,$$obj);
 1852     return $var[0];
 1853 }
 1854 else {
 1855     my $p;
 1856 
 1857     $p = zeroes @var;
 1858     ran_gamma_meat($p,$a,$b,$$obj);
 1859     return $p;
 1860 }
 1861 }
 1862 #line 1863 "RNG.pm"
 1863 
 1864 
 1865 
 1866 #line 950 "../../../blib/lib/PDL/PP.pm"
 1867 
 1868 *ran_gamma_var_meat = \&PDL::GSL::RNG::ran_gamma_var_meat;
 1869 #line 1870 "RNG.pm"
 1870 
 1871 
 1872 
 1873 #line 1431 "gsl_random.pd"
 1874 
 1875 
 1876 sub ran_gamma_var {
 1877 my ($obj,@var) = @_;
 1878     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 1879     return ran_gamma_var_meat(@var,$$obj);
 1880 }
 1881 #line 1882 "RNG.pm"
 1882 
 1883 
 1884 
 1885 #line 950 "../../../blib/lib/PDL/PP.pm"
 1886 
 1887 *ran_flat_meat = \&PDL::GSL::RNG::ran_flat_meat;
 1888 #line 1889 "RNG.pm"
 1889 
 1890 
 1891 
 1892 #line 1407 "gsl_random.pd"
 1893 
 1894 
 1895 sub ran_flat {
 1896 my ($obj,$a,$b,@var) = @_;
 1897 if (ref($var[0]) eq 'PDL') {
 1898     ran_flat_meat($var[0],$a,$b,$$obj);
 1899     return $var[0];
 1900 }
 1901 else {
 1902     my $p;
 1903 
 1904     $p = zeroes @var;
 1905     ran_flat_meat($p,$a,$b,$$obj);
 1906     return $p;
 1907 }
 1908 }
 1909 #line 1910 "RNG.pm"
 1910 
 1911 
 1912 
 1913 #line 950 "../../../blib/lib/PDL/PP.pm"
 1914 
 1915 *ran_flat_var_meat = \&PDL::GSL::RNG::ran_flat_var_meat;
 1916 #line 1917 "RNG.pm"
 1917 
 1918 
 1919 
 1920 #line 1431 "gsl_random.pd"
 1921 
 1922 
 1923 sub ran_flat_var {
 1924 my ($obj,@var) = @_;
 1925     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 1926     return ran_flat_var_meat(@var,$$obj);
 1927 }
 1928 #line 1929 "RNG.pm"
 1929 
 1930 
 1931 
 1932 #line 950 "../../../blib/lib/PDL/PP.pm"
 1933 
 1934 *ran_lognormal_meat = \&PDL::GSL::RNG::ran_lognormal_meat;
 1935 #line 1936 "RNG.pm"
 1936 
 1937 
 1938 
 1939 #line 1407 "gsl_random.pd"
 1940 
 1941 
 1942 sub ran_lognormal {
 1943 my ($obj,$a,$b,@var) = @_;
 1944 if (ref($var[0]) eq 'PDL') {
 1945     ran_lognormal_meat($var[0],$a,$b,$$obj);
 1946     return $var[0];
 1947 }
 1948 else {
 1949     my $p;
 1950 
 1951     $p = zeroes @var;
 1952     ran_lognormal_meat($p,$a,$b,$$obj);
 1953     return $p;
 1954 }
 1955 }
 1956 #line 1957 "RNG.pm"
 1957 
 1958 
 1959 
 1960 #line 950 "../../../blib/lib/PDL/PP.pm"
 1961 
 1962 *ran_lognormal_var_meat = \&PDL::GSL::RNG::ran_lognormal_var_meat;
 1963 #line 1964 "RNG.pm"
 1964 
 1965 
 1966 
 1967 #line 1431 "gsl_random.pd"
 1968 
 1969 
 1970 sub ran_lognormal_var {
 1971 my ($obj,@var) = @_;
 1972     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 1973     return ran_lognormal_var_meat(@var,$$obj);
 1974 }
 1975 #line 1976 "RNG.pm"
 1976 
 1977 
 1978 
 1979 #line 950 "../../../blib/lib/PDL/PP.pm"
 1980 
 1981 *ran_chisq_meat = \&PDL::GSL::RNG::ran_chisq_meat;
 1982 #line 1983 "RNG.pm"
 1983 
 1984 
 1985 
 1986 #line 1407 "gsl_random.pd"
 1987 
 1988 
 1989 sub ran_chisq {
 1990 my ($obj,$a,@var) = @_;
 1991 if (ref($var[0]) eq 'PDL') {
 1992     ran_chisq_meat($var[0],$a,$$obj);
 1993     return $var[0];
 1994 }
 1995 else {
 1996     my $p;
 1997 
 1998     $p = zeroes @var;
 1999     ran_chisq_meat($p,$a,$$obj);
 2000     return $p;
 2001 }
 2002 }
 2003 #line 2004 "RNG.pm"
 2004 
 2005 
 2006 
 2007 #line 950 "../../../blib/lib/PDL/PP.pm"
 2008 
 2009 *ran_chisq_var_meat = \&PDL::GSL::RNG::ran_chisq_var_meat;
 2010 #line 2011 "RNG.pm"
 2011 
 2012 
 2013 
 2014 #line 1431 "gsl_random.pd"
 2015 
 2016 
 2017 sub ran_chisq_var {
 2018 my ($obj,@var) = @_;
 2019     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 2020     return ran_chisq_var_meat(@var,$$obj);
 2021 }
 2022 #line 2023 "RNG.pm"
 2023 
 2024 
 2025 
 2026 #line 950 "../../../blib/lib/PDL/PP.pm"
 2027 
 2028 *ran_fdist_meat = \&PDL::GSL::RNG::ran_fdist_meat;
 2029 #line 2030 "RNG.pm"
 2030 
 2031 
 2032 
 2033 #line 1407 "gsl_random.pd"
 2034 
 2035 
 2036 sub ran_fdist {
 2037 my ($obj,$a,$b,@var) = @_;
 2038 if (ref($var[0]) eq 'PDL') {
 2039     ran_fdist_meat($var[0],$a,$b,$$obj);
 2040     return $var[0];
 2041 }
 2042 else {
 2043     my $p;
 2044 
 2045     $p = zeroes @var;
 2046     ran_fdist_meat($p,$a,$b,$$obj);
 2047     return $p;
 2048 }
 2049 }
 2050 #line 2051 "RNG.pm"
 2051 
 2052 
 2053 
 2054 #line 950 "../../../blib/lib/PDL/PP.pm"
 2055 
 2056 *ran_fdist_var_meat = \&PDL::GSL::RNG::ran_fdist_var_meat;
 2057 #line 2058 "RNG.pm"
 2058 
 2059 
 2060 
 2061 #line 1431 "gsl_random.pd"
 2062 
 2063 
 2064 sub ran_fdist_var {
 2065 my ($obj,@var) = @_;
 2066     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 2067     return ran_fdist_var_meat(@var,$$obj);
 2068 }
 2069 #line 2070 "RNG.pm"
 2070 
 2071 
 2072 
 2073 #line 950 "../../../blib/lib/PDL/PP.pm"
 2074 
 2075 *ran_tdist_meat = \&PDL::GSL::RNG::ran_tdist_meat;
 2076 #line 2077 "RNG.pm"
 2077 
 2078 
 2079 
 2080 #line 1407 "gsl_random.pd"
 2081 
 2082 
 2083 sub ran_tdist {
 2084 my ($obj,$a,@var) = @_;
 2085 if (ref($var[0]) eq 'PDL') {
 2086     ran_tdist_meat($var[0],$a,$$obj);
 2087     return $var[0];
 2088 }
 2089 else {
 2090     my $p;
 2091 
 2092     $p = zeroes @var;
 2093     ran_tdist_meat($p,$a,$$obj);
 2094     return $p;
 2095 }
 2096 }
 2097 #line 2098 "RNG.pm"
 2098 
 2099 
 2100 
 2101 #line 950 "../../../blib/lib/PDL/PP.pm"
 2102 
 2103 *ran_tdist_var_meat = \&PDL::GSL::RNG::ran_tdist_var_meat;
 2104 #line 2105 "RNG.pm"
 2105 
 2106 
 2107 
 2108 #line 1431 "gsl_random.pd"
 2109 
 2110 
 2111 sub ran_tdist_var {
 2112 my ($obj,@var) = @_;
 2113     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 2114     return ran_tdist_var_meat(@var,$$obj);
 2115 }
 2116 #line 2117 "RNG.pm"
 2117 
 2118 
 2119 
 2120 #line 950 "../../../blib/lib/PDL/PP.pm"
 2121 
 2122 *ran_beta_meat = \&PDL::GSL::RNG::ran_beta_meat;
 2123 #line 2124 "RNG.pm"
 2124 
 2125 
 2126 
 2127 #line 1407 "gsl_random.pd"
 2128 
 2129 
 2130 sub ran_beta {
 2131 my ($obj,$a,$b,@var) = @_;
 2132 if (ref($var[0]) eq 'PDL') {
 2133     ran_beta_meat($var[0],$a,$b,$$obj);
 2134     return $var[0];
 2135 }
 2136 else {
 2137     my $p;
 2138 
 2139     $p = zeroes @var;
 2140     ran_beta_meat($p,$a,$b,$$obj);
 2141     return $p;
 2142 }
 2143 }
 2144 #line 2145 "RNG.pm"
 2145 
 2146 
 2147 
 2148 #line 950 "../../../blib/lib/PDL/PP.pm"
 2149 
 2150 *ran_beta_var_meat = \&PDL::GSL::RNG::ran_beta_var_meat;
 2151 #line 2152 "RNG.pm"
 2152 
 2153 
 2154 
 2155 #line 1431 "gsl_random.pd"
 2156 
 2157 
 2158 sub ran_beta_var {
 2159 my ($obj,@var) = @_;
 2160     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 2161     return ran_beta_var_meat(@var,$$obj);
 2162 }
 2163 #line 2164 "RNG.pm"
 2164 
 2165 
 2166 
 2167 #line 950 "../../../blib/lib/PDL/PP.pm"
 2168 
 2169 *ran_logistic_meat = \&PDL::GSL::RNG::ran_logistic_meat;
 2170 #line 2171 "RNG.pm"
 2171 
 2172 
 2173 
 2174 #line 1407 "gsl_random.pd"
 2175 
 2176 
 2177 sub ran_logistic {
 2178 my ($obj,$a,@var) = @_;
 2179 if (ref($var[0]) eq 'PDL') {
 2180     ran_logistic_meat($var[0],$a,$$obj);
 2181     return $var[0];
 2182 }
 2183 else {
 2184     my $p;
 2185 
 2186     $p = zeroes @var;
 2187     ran_logistic_meat($p,$a,$$obj);
 2188     return $p;
 2189 }
 2190 }
 2191 #line 2192 "RNG.pm"
 2192 
 2193 
 2194 
 2195 #line 950 "../../../blib/lib/PDL/PP.pm"
 2196 
 2197 *ran_logistic_var_meat = \&PDL::GSL::RNG::ran_logistic_var_meat;
 2198 #line 2199 "RNG.pm"
 2199 
 2200 
 2201 
 2202 #line 1431 "gsl_random.pd"
 2203 
 2204 
 2205 sub ran_logistic_var {
 2206 my ($obj,@var) = @_;
 2207     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 2208     return ran_logistic_var_meat(@var,$$obj);
 2209 }
 2210 #line 2211 "RNG.pm"
 2211 
 2212 
 2213 
 2214 #line 950 "../../../blib/lib/PDL/PP.pm"
 2215 
 2216 *ran_pareto_meat = \&PDL::GSL::RNG::ran_pareto_meat;
 2217 #line 2218 "RNG.pm"
 2218 
 2219 
 2220 
 2221 #line 1407 "gsl_random.pd"
 2222 
 2223 
 2224 sub ran_pareto {
 2225 my ($obj,$a,$b,@var) = @_;
 2226 if (ref($var[0]) eq 'PDL') {
 2227     ran_pareto_meat($var[0],$a,$b,$$obj);
 2228     return $var[0];
 2229 }
 2230 else {
 2231     my $p;
 2232 
 2233     $p = zeroes @var;
 2234     ran_pareto_meat($p,$a,$b,$$obj);
 2235     return $p;
 2236 }
 2237 }
 2238 #line 2239 "RNG.pm"
 2239 
 2240 
 2241 
 2242 #line 950 "../../../blib/lib/PDL/PP.pm"
 2243 
 2244 *ran_pareto_var_meat = \&PDL::GSL::RNG::ran_pareto_var_meat;
 2245 #line 2246 "RNG.pm"
 2246 
 2247 
 2248 
 2249 #line 1431 "gsl_random.pd"
 2250 
 2251 
 2252 sub ran_pareto_var {
 2253 my ($obj,@var) = @_;
 2254     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 2255     return ran_pareto_var_meat(@var,$$obj);
 2256 }
 2257 #line 2258 "RNG.pm"
 2258 
 2259 
 2260 
 2261 #line 950 "../../../blib/lib/PDL/PP.pm"
 2262 
 2263 *ran_weibull_meat = \&PDL::GSL::RNG::ran_weibull_meat;
 2264 #line 2265 "RNG.pm"
 2265 
 2266 
 2267 
 2268 #line 1407 "gsl_random.pd"
 2269 
 2270 
 2271 sub ran_weibull {
 2272 my ($obj,$a,$b,@var) = @_;
 2273 if (ref($var[0]) eq 'PDL') {
 2274     ran_weibull_meat($var[0],$a,$b,$$obj);
 2275     return $var[0];
 2276 }
 2277 else {
 2278     my $p;
 2279 
 2280     $p = zeroes @var;
 2281     ran_weibull_meat($p,$a,$b,$$obj);
 2282     return $p;
 2283 }
 2284 }
 2285 #line 2286 "RNG.pm"
 2286 
 2287 
 2288 
 2289 #line 950 "../../../blib/lib/PDL/PP.pm"
 2290 
 2291 *ran_weibull_var_meat = \&PDL::GSL::RNG::ran_weibull_var_meat;
 2292 #line 2293 "RNG.pm"
 2293 
 2294 
 2295 
 2296 #line 1431 "gsl_random.pd"
 2297 
 2298 
 2299 sub ran_weibull_var {
 2300 my ($obj,@var) = @_;
 2301     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 2302     return ran_weibull_var_meat(@var,$$obj);
 2303 }
 2304 #line 2305 "RNG.pm"
 2305 
 2306 
 2307 
 2308 #line 950 "../../../blib/lib/PDL/PP.pm"
 2309 
 2310 *ran_gumbel1_meat = \&PDL::GSL::RNG::ran_gumbel1_meat;
 2311 #line 2312 "RNG.pm"
 2312 
 2313 
 2314 
 2315 #line 1407 "gsl_random.pd"
 2316 
 2317 
 2318 sub ran_gumbel1 {
 2319 my ($obj,$a,$b,@var) = @_;
 2320 if (ref($var[0]) eq 'PDL') {
 2321     ran_gumbel1_meat($var[0],$a,$b,$$obj);
 2322     return $var[0];
 2323 }
 2324 else {
 2325     my $p;
 2326 
 2327     $p = zeroes @var;
 2328     ran_gumbel1_meat($p,$a,$b,$$obj);
 2329     return $p;
 2330 }
 2331 }
 2332 #line 2333 "RNG.pm"
 2333 
 2334 
 2335 
 2336 #line 950 "../../../blib/lib/PDL/PP.pm"
 2337 
 2338 *ran_gumbel1_var_meat = \&PDL::GSL::RNG::ran_gumbel1_var_meat;
 2339 #line 2340 "RNG.pm"
 2340 
 2341 
 2342 
 2343 #line 1431 "gsl_random.pd"
 2344 
 2345 
 2346 sub ran_gumbel1_var {
 2347 my ($obj,@var) = @_;
 2348     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 2349     return ran_gumbel1_var_meat(@var,$$obj);
 2350 }
 2351 #line 2352 "RNG.pm"
 2352 
 2353 
 2354 
 2355 #line 950 "../../../blib/lib/PDL/PP.pm"
 2356 
 2357 *ran_gumbel2_meat = \&PDL::GSL::RNG::ran_gumbel2_meat;
 2358 #line 2359 "RNG.pm"
 2359 
 2360 
 2361 
 2362 #line 1407 "gsl_random.pd"
 2363 
 2364 
 2365 sub ran_gumbel2 {
 2366 my ($obj,$a,$b,@var) = @_;
 2367 if (ref($var[0]) eq 'PDL') {
 2368     ran_gumbel2_meat($var[0],$a,$b,$$obj);
 2369     return $var[0];
 2370 }
 2371 else {
 2372     my $p;
 2373 
 2374     $p = zeroes @var;
 2375     ran_gumbel2_meat($p,$a,$b,$$obj);
 2376     return $p;
 2377 }
 2378 }
 2379 #line 2380 "RNG.pm"
 2380 
 2381 
 2382 
 2383 #line 950 "../../../blib/lib/PDL/PP.pm"
 2384 
 2385 *ran_gumbel2_var_meat = \&PDL::GSL::RNG::ran_gumbel2_var_meat;
 2386 #line 2387 "RNG.pm"
 2387 
 2388 
 2389 
 2390 #line 1431 "gsl_random.pd"
 2391 
 2392 
 2393 sub ran_gumbel2_var {
 2394 my ($obj,@var) = @_;
 2395     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 2396     return ran_gumbel2_var_meat(@var,$$obj);
 2397 }
 2398 #line 2399 "RNG.pm"
 2399 
 2400 
 2401 
 2402 #line 950 "../../../blib/lib/PDL/PP.pm"
 2403 
 2404 *ran_poisson_meat = \&PDL::GSL::RNG::ran_poisson_meat;
 2405 #line 2406 "RNG.pm"
 2406 
 2407 
 2408 
 2409 #line 1407 "gsl_random.pd"
 2410 
 2411 
 2412 sub ran_poisson {
 2413 my ($obj,$a,@var) = @_;
 2414 if (ref($var[0]) eq 'PDL') {
 2415     ran_poisson_meat($var[0],$a,$$obj);
 2416     return $var[0];
 2417 }
 2418 else {
 2419     my $p;
 2420 
 2421     $p = zeroes @var;
 2422     ran_poisson_meat($p,$a,$$obj);
 2423     return $p;
 2424 }
 2425 }
 2426 #line 2427 "RNG.pm"
 2427 
 2428 
 2429 
 2430 #line 950 "../../../blib/lib/PDL/PP.pm"
 2431 
 2432 *ran_poisson_var_meat = \&PDL::GSL::RNG::ran_poisson_var_meat;
 2433 #line 2434 "RNG.pm"
 2434 
 2435 
 2436 
 2437 #line 1431 "gsl_random.pd"
 2438 
 2439 
 2440 sub ran_poisson_var {
 2441 my ($obj,@var) = @_;
 2442     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 2443     return ran_poisson_var_meat(@var,$$obj);
 2444 }
 2445 #line 2446 "RNG.pm"
 2446 
 2447 
 2448 
 2449 #line 950 "../../../blib/lib/PDL/PP.pm"
 2450 
 2451 *ran_bernoulli_meat = \&PDL::GSL::RNG::ran_bernoulli_meat;
 2452 #line 2453 "RNG.pm"
 2453 
 2454 
 2455 
 2456 #line 1407 "gsl_random.pd"
 2457 
 2458 
 2459 sub ran_bernoulli {
 2460 my ($obj,$a,@var) = @_;
 2461 if (ref($var[0]) eq 'PDL') {
 2462     ran_bernoulli_meat($var[0],$a,$$obj);
 2463     return $var[0];
 2464 }
 2465 else {
 2466     my $p;
 2467 
 2468     $p = zeroes @var;
 2469     ran_bernoulli_meat($p,$a,$$obj);
 2470     return $p;
 2471 }
 2472 }
 2473 #line 2474 "RNG.pm"
 2474 
 2475 
 2476 
 2477 #line 950 "../../../blib/lib/PDL/PP.pm"
 2478 
 2479 *ran_bernoulli_var_meat = \&PDL::GSL::RNG::ran_bernoulli_var_meat;
 2480 #line 2481 "RNG.pm"
 2481 
 2482 
 2483 
 2484 #line 1431 "gsl_random.pd"
 2485 
 2486 
 2487 sub ran_bernoulli_var {
 2488 my ($obj,@var) = @_;
 2489     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 2490     return ran_bernoulli_var_meat(@var,$$obj);
 2491 }
 2492 #line 2493 "RNG.pm"
 2493 
 2494 
 2495 
 2496 #line 950 "../../../blib/lib/PDL/PP.pm"
 2497 
 2498 *ran_binomial_meat = \&PDL::GSL::RNG::ran_binomial_meat;
 2499 #line 2500 "RNG.pm"
 2500 
 2501 
 2502 
 2503 #line 1407 "gsl_random.pd"
 2504 
 2505 
 2506 sub ran_binomial {
 2507 my ($obj,$a,$b,@var) = @_;
 2508 if (ref($var[0]) eq 'PDL') {
 2509     ran_binomial_meat($var[0],$a,$b,$$obj);
 2510     return $var[0];
 2511 }
 2512 else {
 2513     my $p;
 2514 
 2515     $p = zeroes @var;
 2516     ran_binomial_meat($p,$a,$b,$$obj);
 2517     return $p;
 2518 }
 2519 }
 2520 #line 2521 "RNG.pm"
 2521 
 2522 
 2523 
 2524 #line 950 "../../../blib/lib/PDL/PP.pm"
 2525 
 2526 *ran_binomial_var_meat = \&PDL::GSL::RNG::ran_binomial_var_meat;
 2527 #line 2528 "RNG.pm"
 2528 
 2529 
 2530 
 2531 #line 1431 "gsl_random.pd"
 2532 
 2533 
 2534 sub ran_binomial_var {
 2535 my ($obj,@var) = @_;
 2536     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 2537     return ran_binomial_var_meat(@var,$$obj);
 2538 }
 2539 #line 2540 "RNG.pm"
 2540 
 2541 
 2542 
 2543 #line 950 "../../../blib/lib/PDL/PP.pm"
 2544 
 2545 *ran_negative_binomial_meat = \&PDL::GSL::RNG::ran_negative_binomial_meat;
 2546 #line 2547 "RNG.pm"
 2547 
 2548 
 2549 
 2550 #line 1407 "gsl_random.pd"
 2551 
 2552 
 2553 sub ran_negative_binomial {
 2554 my ($obj,$a,$b,@var) = @_;
 2555 if (ref($var[0]) eq 'PDL') {
 2556     ran_negative_binomial_meat($var[0],$a,$b,$$obj);
 2557     return $var[0];
 2558 }
 2559 else {
 2560     my $p;
 2561 
 2562     $p = zeroes @var;
 2563     ran_negative_binomial_meat($p,$a,$b,$$obj);
 2564     return $p;
 2565 }
 2566 }
 2567 #line 2568 "RNG.pm"
 2568 
 2569 
 2570 
 2571 #line 950 "../../../blib/lib/PDL/PP.pm"
 2572 
 2573 *ran_negative_binomial_var_meat = \&PDL::GSL::RNG::ran_negative_binomial_var_meat;
 2574 #line 2575 "RNG.pm"
 2575 
 2576 
 2577 
 2578 #line 1431 "gsl_random.pd"
 2579 
 2580 
 2581 sub ran_negative_binomial_var {
 2582 my ($obj,@var) = @_;
 2583     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 2584     return ran_negative_binomial_var_meat(@var,$$obj);
 2585 }
 2586 #line 2587 "RNG.pm"
 2587 
 2588 
 2589 
 2590 #line 950 "../../../blib/lib/PDL/PP.pm"
 2591 
 2592 *ran_pascal_meat = \&PDL::GSL::RNG::ran_pascal_meat;
 2593 #line 2594 "RNG.pm"
 2594 
 2595 
 2596 
 2597 #line 1407 "gsl_random.pd"
 2598 
 2599 
 2600 sub ran_pascal {
 2601 my ($obj,$a,$b,@var) = @_;
 2602 if (ref($var[0]) eq 'PDL') {
 2603     ran_pascal_meat($var[0],$a,$b,$$obj);
 2604     return $var[0];
 2605 }
 2606 else {
 2607     my $p;
 2608 
 2609     $p = zeroes @var;
 2610     ran_pascal_meat($p,$a,$b,$$obj);
 2611     return $p;
 2612 }
 2613 }
 2614 #line 2615 "RNG.pm"
 2615 
 2616 
 2617 
 2618 #line 950 "../../../blib/lib/PDL/PP.pm"
 2619 
 2620 *ran_pascal_var_meat = \&PDL::GSL::RNG::ran_pascal_var_meat;
 2621 #line 2622 "RNG.pm"
 2622 
 2623 
 2624 
 2625 #line 1431 "gsl_random.pd"
 2626 
 2627 
 2628 sub ran_pascal_var {
 2629 my ($obj,@var) = @_;
 2630     if (scalar(@var) != 2) {barf("Bad number of parameters!");}
 2631     return ran_pascal_var_meat(@var,$$obj);
 2632 }
 2633 #line 2634 "RNG.pm"
 2634 
 2635 
 2636 
 2637 #line 950 "../../../blib/lib/PDL/PP.pm"
 2638 
 2639 *ran_geometric_meat = \&PDL::GSL::RNG::ran_geometric_meat;
 2640 #line 2641 "RNG.pm"
 2641 
 2642 
 2643 
 2644 #line 1407 "gsl_random.pd"
 2645 
 2646 
 2647 sub ran_geometric {
 2648 my ($obj,$a,@var) = @_;
 2649 if (ref($var[0]) eq 'PDL') {
 2650     ran_geometric_meat($var[0],$a,$$obj);
 2651     return $var[0];
 2652 }
 2653 else {
 2654     my $p;
 2655 
 2656     $p = zeroes @var;
 2657     ran_geometric_meat($p,$a,$$obj);
 2658     return $p;
 2659 }
 2660 }
 2661 #line 2662 "RNG.pm"
 2662 
 2663 
 2664 
 2665 #line 950 "../../../blib/lib/PDL/PP.pm"
 2666 
 2667 *ran_geometric_var_meat = \&PDL::GSL::RNG::ran_geometric_var_meat;
 2668 #line 2669 "RNG.pm"
 2669 
 2670 
 2671 
 2672 #line 1431 "gsl_random.pd"
 2673 
 2674 
 2675 sub ran_geometric_var {
 2676 my ($obj,@var) = @_;
 2677     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 2678     return ran_geometric_var_meat(@var,$$obj);
 2679 }
 2680 #line 2681 "RNG.pm"
 2681 
 2682 
 2683 
 2684 #line 950 "../../../blib/lib/PDL/PP.pm"
 2685 
 2686 *ran_hypergeometric_meat = \&PDL::GSL::RNG::ran_hypergeometric_meat;
 2687 #line 2688 "RNG.pm"
 2688 
 2689 
 2690 
 2691 #line 1407 "gsl_random.pd"
 2692 
 2693 
 2694 sub ran_hypergeometric {
 2695 my ($obj,$a,$b,$c,@var) = @_;
 2696 if (ref($var[0]) eq 'PDL') {
 2697     ran_hypergeometric_meat($var[0],$a,$b,$c,$$obj);
 2698     return $var[0];
 2699 }
 2700 else {
 2701     my $p;
 2702 
 2703     $p = zeroes @var;
 2704     ran_hypergeometric_meat($p,$a,$b,$c,$$obj);
 2705     return $p;
 2706 }
 2707 }
 2708 #line 2709 "RNG.pm"
 2709 
 2710 
 2711 
 2712 #line 950 "../../../blib/lib/PDL/PP.pm"
 2713 
 2714 *ran_hypergeometric_var_meat = \&PDL::GSL::RNG::ran_hypergeometric_var_meat;
 2715 #line 2716 "RNG.pm"
 2716 
 2717 
 2718 
 2719 #line 1431 "gsl_random.pd"
 2720 
 2721 
 2722 sub ran_hypergeometric_var {
 2723 my ($obj,@var) = @_;
 2724     if (scalar(@var) != 3) {barf("Bad number of parameters!");}
 2725     return ran_hypergeometric_var_meat(@var,$$obj);
 2726 }
 2727 #line 2728 "RNG.pm"
 2728 
 2729 
 2730 
 2731 #line 950 "../../../blib/lib/PDL/PP.pm"
 2732 
 2733 *ran_logarithmic_meat = \&PDL::GSL::RNG::ran_logarithmic_meat;
 2734 #line 2735 "RNG.pm"
 2735 
 2736 
 2737 
 2738 #line 1407 "gsl_random.pd"
 2739 
 2740 
 2741 sub ran_logarithmic {
 2742 my ($obj,$a,@var) = @_;
 2743 if (ref($var[0]) eq 'PDL') {
 2744     ran_logarithmic_meat($var[0],$a,$$obj);
 2745     return $var[0];
 2746 }
 2747 else {
 2748     my $p;
 2749 
 2750     $p = zeroes @var;
 2751     ran_logarithmic_meat($p,$a,$$obj);
 2752     return $p;
 2753 }
 2754 }
 2755 #line 2756 "RNG.pm"
 2756 
 2757 
 2758 
 2759 #line 950 "../../../blib/lib/PDL/PP.pm"
 2760 
 2761 *ran_logarithmic_var_meat = \&PDL::GSL::RNG::ran_logarithmic_var_meat;
 2762 #line 2763 "RNG.pm"
 2763 
 2764 
 2765 
 2766 #line 1431 "gsl_random.pd"
 2767 
 2768 
 2769 sub ran_logarithmic_var {
 2770 my ($obj,@var) = @_;
 2771     if (scalar(@var) != 1) {barf("Bad number of parameters!");}
 2772     return ran_logarithmic_var_meat(@var,$$obj);
 2773 }
 2774 #line 2775 "RNG.pm"
 2775 
 2776 
 2777 
 2778 #line 950 "../../../blib/lib/PDL/PP.pm"
 2779 
 2780 *ran_additive_gaussian_meat = \&PDL::GSL::RNG::ran_additive_gaussian_meat;
 2781 #line 2782 "RNG.pm"
 2782 
 2783 
 2784 
 2785 #line 1521 "gsl_random.pd"
 2786 
 2787 
 2788        sub ran_additive_gaussian {
 2789      my ($obj,$sigma,$var) = @_;
 2790      barf("In additive gaussian mode you must specify an ndarray!")
 2791        if ref($var) ne 'PDL';
 2792      ran_additive_gaussian_meat($var,$sigma,$$obj);
 2793      return $var;
 2794        }
 2795        
 2796 #line 2797 "RNG.pm"
 2797 
 2798 
 2799 
 2800 #line 950 "../../../blib/lib/PDL/PP.pm"
 2801 
 2802 *ran_additive_poisson_meat = \&PDL::GSL::RNG::ran_additive_poisson_meat;
 2803 #line 2804 "RNG.pm"
 2804 
 2805 
 2806 
 2807 #line 1537 "gsl_random.pd"
 2808 
 2809 
 2810        sub ran_additive_poisson {
 2811      my ($obj,$sigma,$var) = @_;
 2812      barf("In additive poisson mode you must specify an ndarray!")
 2813        if ref($var) ne 'PDL';
 2814      ran_additive_poisson_meat($var,$sigma,$$obj);
 2815      return $var;
 2816        }
 2817        
 2818 #line 2819 "RNG.pm"
 2819 
 2820 
 2821 
 2822 #line 950 "../../../blib/lib/PDL/PP.pm"
 2823 
 2824 *ran_feed_poisson_meat = \&PDL::GSL::RNG::ran_feed_poisson_meat;
 2825 #line 2826 "RNG.pm"
 2826 
 2827 
 2828 
 2829 #line 1553 "gsl_random.pd"
 2830 
 2831 
 2832        sub ran_feed_poisson {
 2833      my ($obj,$var) = @_;
 2834      barf("In poisson mode you must specify an ndarray!")
 2835        if ref($var) ne 'PDL';
 2836      ran_feed_poisson_meat($var,$$obj);
 2837      return $var;
 2838        }
 2839        
 2840 #line 2841 "RNG.pm"
 2841 
 2842 
 2843 
 2844 #line 950 "../../../blib/lib/PDL/PP.pm"
 2845 
 2846 *ran_bivariate_gaussian_meat = \&PDL::GSL::RNG::ran_bivariate_gaussian_meat;
 2847 #line 2848 "RNG.pm"
 2848 
 2849 
 2850 
 2851 #line 1574 "gsl_random.pd"
 2852 
 2853 
 2854        sub ran_bivariate_gaussian {
 2855      my ($obj,$sigma_x,$sigma_y,$rho,$n) = @_;
 2856      barf("Not enough parameters for gaussian bivariate!") if $n<=0;
 2857      my $p = zeroes(2,$n);
 2858      ran_bivariate_gaussian_meat($p,$sigma_x,$sigma_y,$rho,$$obj);
 2859      return $p;
 2860        }
 2861        
 2862 #line 2863 "RNG.pm"
 2863 
 2864 
 2865 
 2866 #line 950 "../../../blib/lib/PDL/PP.pm"
 2867 
 2868 *ran_dir_2d_meat = \&PDL::GSL::RNG::ran_dir_2d_meat;
 2869 #line 2870 "RNG.pm"
 2870 
 2871 
 2872 
 2873 #line 950 "../../../blib/lib/PDL/PP.pm"
 2874 
 2875 *ran_dir_3d_meat = \&PDL::GSL::RNG::ran_dir_3d_meat;
 2876 #line 2877 "RNG.pm"
 2877 
 2878 
 2879 
 2880 #line 950 "../../../blib/lib/PDL/PP.pm"
 2881 
 2882 *ran_dir_nd_meat = \&PDL::GSL::RNG::ran_dir_nd_meat;
 2883 #line 2884 "RNG.pm"
 2884 
 2885 
 2886 
 2887 #line 1618 "gsl_random.pd"
 2888 
 2889 
 2890        sub ran_dir {
 2891      my ($obj,$ndim,$n) = @_;
 2892      barf("Not enough parameters for random vectors!") if $n<=0;
 2893      my $p = zeroes($ndim,$n);
 2894      if ($ndim==2) { ran_dir_2d_meat($p,$$obj); }
 2895      elsif ($ndim==3) { ran_dir_3d_meat($p,$$obj); }
 2896      elsif ($ndim>=4 && $ndim<=100) { ran_dir_nd_meat($p,$ndim,$$obj); }
 2897      else { barf("Bad number of dimensions!"); }
 2898      return $p;
 2899        }
 2900        
 2901 #line 2902 "RNG.pm"
 2902 
 2903 
 2904 
 2905 #line 950 "../../../blib/lib/PDL/PP.pm"
 2906 
 2907 *ran_discrete_meat = \&PDL::GSL::RNG::ran_discrete_meat;
 2908 #line 2909 "RNG.pm"
 2909 
 2910 
 2911 
 2912 #line 1638 "gsl_random.pd"
 2913 
 2914 
 2915 sub ran_discrete {
 2916 my ($obj, $rdt, @var) = @_;
 2917 if (ref($var[0]) eq 'PDL') {
 2918     ran_discrete_meat($var[0], $$rdt, $$obj);
 2919     return $var[0];
 2920 }
 2921 else {
 2922     my $p;
 2923 
 2924     $p = zeroes @var;
 2925     ran_discrete_meat($p, $$rdt, $$obj);
 2926     return $p;
 2927 }
 2928 }
 2929 #line 2930 "RNG.pm"
 2930 
 2931 
 2932 
 2933 #line 1655 "gsl_random.pd"
 2934 
 2935 
 2936 sub ran_shuffle_vec {
 2937 my ($obj,@in) = @_;
 2938 my (@out,$i,$p);
 2939 
 2940 $p = long [0..$#in];
 2941 $obj->ran_shuffle($p);
 2942 for($i=0;$i<scalar(@in);$i++) {
 2943 $out[$p->at($i)]=$in[$i];
 2944 }
 2945 return @out;
 2946 }
 2947 #line 2948 "RNG.pm"
 2948 
 2949 
 2950 
 2951 #line 1669 "gsl_random.pd"
 2952 
 2953 
 2954 sub ran_choose_vec {
 2955 my ($obj,$nout,@in) = @_;
 2956 my (@out,$i,$pin,$pout);
 2957 
 2958 $pin = long [0..$#in];
 2959 $pout = long [0..($nout-1)];
 2960 $obj->ran_choose($pin,$pout);
 2961 for($i=0;$i<$nout;$i++) {
 2962 $out[$i]=$in[$pout->at($i)];
 2963 }
 2964 return @out;
 2965 }
 2966 #line 2967 "RNG.pm"
 2967 
 2968 
 2969 
 2970 #line 950 "../../../blib/lib/PDL/PP.pm"
 2971 
 2972 *ran_ver_meat = \&PDL::GSL::RNG::ran_ver_meat;
 2973 #line 2974 "RNG.pm"
 2974 
 2975 
 2976 
 2977 #line 950 "../../../blib/lib/PDL/PP.pm"
 2978 
 2979 *ran_caos_meat = \&PDL::GSL::RNG::ran_caos_meat;
 2980 #line 2981 "RNG.pm"
 2981 
 2982 
 2983 
 2984 #line 1703 "gsl_random.pd"
 2985 
 2986 
 2987        sub ran_ver {
 2988      my ($obj,$x0,$r,$n) = @_;
 2989      barf("Not enough parameters for ran_ver!") if $n<=0;
 2990      my $p = zeroes($n);
 2991      ran_ver_meat($p,$x0,$r,$n,$$obj);
 2992      return $p;
 2993        }
 2994        
 2995 #line 2996 "RNG.pm"
 2996 
 2997 
 2998 
 2999 #line 1713 "gsl_random.pd"
 3000 
 3001 
 3002        sub ran_caos {
 3003      my ($obj,$m,$n) = @_;
 3004      barf("Not enough parameters for ran_caos!") if $n<=0;
 3005      my $p = zeroes($n);
 3006      ran_caos_meat($p,$m,$n,$$obj);
 3007      return $p;
 3008        }
 3009        
 3010 #line 3011 "RNG.pm"
 3011 
 3012 
 3013 
 3014 
 3015 
 3016 
 3017 # Exit with OK status
 3018 
 3019 1;