.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "RNG 3pm" .TH RNG 3pm "2016-10-10" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" PDL::GSL::RNG \- PDL interface to RNG and randist routines in GSL .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is an interface to the rng and randist packages present in the \s-1GNU\s0 Scientific Library. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use PDL; \& use PDL::GSL::RNG; \& \& $rng = PDL::GSL::RNG\->new(\*(Aqtaus\*(Aq); \& \& $rng\->set_seed(time()); \& \& $a=zeroes(5,5,5) \& \& $rng\->get_uniform($a); # inplace \& \& $b=$rng\->get_uniform(3,4,5); # creates new pdl .Ve .SH "FUNCTIONS" .IX Header "FUNCTIONS" .SS "new" .IX Subsection "new" The new method initializes a new instance of the \s-1RNG.\s0 .PP The available RNGs are: .PP .Vb 10 \& coveyou cmrg fishman18 fishman20 fishman2x gfsr4 knuthran \& knuthran2 knuthran2002 lecuyer21 minstd mrg mt19937 mt19937_1999 \& mt19937_1998 r250 ran0 ran1 ran2 ran3 rand rand48 random128_bsd \& random128_glibc2 random128_libc5 random256_bsd random256_glibc2 \& random256_libc5 random32_bsd random32_glibc2 random32_libc5 \& random64_bsd random64_glibc2 random64_libc5 random8_bsd \& random8_glibc2 random8_libc5 random_bsd random_glibc2 \& random_libc5 randu ranf ranlux ranlux389 ranlxd1 ranlxd2 ranlxs0 \& ranlxs1 ranlxs2 ranmar slatec taus taus2 taus113 transputer tt800 \& uni uni32 vax waterman14 zuf default .Ve .PP The last one (default) uses the environment variable \s-1GSL_RNG_TYPE.\s0 .PP Note that only a few of these rngs are recommended for general use. Please check the \s-1GSL\s0 documentation for more information. .PP Usage: .PP .Vb 1 \& $blessed_ref = PDL::GSL::RNG\->new($RNG_name); .Ve .PP Example: .PP .Vb 1 \& $rng = PDL::GSL::RNG\->new(\*(Aqtaus\*(Aq); .Ve .SS "set_seed" .IX Subsection "set_seed" Sets the \s-1RNG\s0 seed. .PP Usage: .PP .Vb 3 \& $rng\->set_seed($integer); \& # or \& $rng = PDL::GSL::RNG\->new(\*(Aqtaus\*(Aq)\->set_seed($integer); .Ve .PP Example: .PP .Vb 1 \& $rng\->set_seed(666); .Ve .SS "min" .IX Subsection "min" Return the minimum value generable by this \s-1RNG.\s0 .PP Usage: .PP .Vb 1 \& $integer = $rng\->min(); .Ve .PP Example: .PP .Vb 1 \& $min = $rng\->min(); $max = $rng\->max(); .Ve .SS "max" .IX Subsection "max" Return the maximum value generable by the \s-1RNG.\s0 .PP Usage: .PP .Vb 1 \& $integer = $rng\->max(); .Ve .PP Example: .PP .Vb 1 \& $min = $rng\->min(); $max = $rng\->max(); .Ve .SS "name" .IX Subsection "name" Returns the name of the \s-1RNG.\s0 .PP Usage: .PP .Vb 1 \& $string = $rng\->name(); .Ve .PP Example: .PP .Vb 1 \& $name = $rng\->name(); .Ve .SS "get" .IX Subsection "get" This function creates a piddle with given dimensions or accept an existing piddle and fills it. \fIget()\fR returns integer values between a minimum and a maximum specific to every \s-1RNG.\s0 .PP Usage: .PP .Vb 2 \& $piddle = $rng\->get($list_of_integers) \& $rng\->get($piddle); .Ve .PP Example: .PP .Vb 2 \& $a = zeroes 5,6; \& $o = $rng\->get(10,10); $rng\->get($a); .Ve .SS "get_int" .IX Subsection "get_int" This function creates a piddle with given dimensions or accept an existing piddle and fills it. \fIget_int()\fR returns integer values between 0 and \f(CW$max\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->get($max, $list_of_integers) \& $rng\->get($max, $piddle); .Ve .PP Example: .PP .Vb 2 \& $a = zeroes 5,6; $max=100; \& $o = $rng\->get(10,10); $rng\->get($a); .Ve .SS "get_uniform" .IX Subsection "get_uniform" This function creates a piddle with given dimensions or accept an existing piddle and fills it. \fIget_uniform()\fR returns values 0<=x<1, .PP Usage: .PP .Vb 2 \& $piddle = $rng\->get_uniform($list_of_integers) \& $rng\->get_uniform($piddle); .Ve .PP Example: .PP .Vb 2 \& $a = zeroes 5,6; $max=100; \& $o = $rng\->get_uniform(10,10); $rng\->get_uniform($a); .Ve .SS "get_uniform_pos" .IX Subsection "get_uniform_pos" This function creates a piddle with given dimensions or accept an existing piddle and fills it. \fIget_uniform_pos()\fR returns values 0get_uniform_pos($list_of_integers) \& $rng\->get_uniform_pos($piddle); .Ve .PP Example: .PP .Vb 2 \& $a = zeroes 5,6; \& $o = $rng\->get_uniform_pos(10,10); $rng\->get_uniform_pos($a); .Ve .SS "ran_shuffle" .IX Subsection "ran_shuffle" Shuffles values in piddle .PP Usage: .PP .Vb 1 \& $rng\->ran_shuffle($piddle); .Ve .SS "ran_shuffle_vec" .IX Subsection "ran_shuffle_vec" Shuffles values in piddle .PP Usage: .PP .Vb 1 \& $rng\->ran_shuffle_vec(@vec); .Ve .SS "ran_choose" .IX Subsection "ran_choose" Chooses values from \f(CW$inpiddle\fR to \f(CW$outpiddle\fR. .PP Usage: .PP .Vb 1 \& $rng\->ran_choose($inpiddle,$outpiddle); .Ve .SS "ran_choose_vec" .IX Subsection "ran_choose_vec" Chooses \f(CW$n\fR values from \f(CW@vec\fR. .PP Usage: .PP .Vb 1 \& @chosen = $rng\->ran_choose_vec($n,@vec); .Ve .SS "ran_gaussian" .IX Subsection "ran_gaussian" Fills output piddle with random values from Gaussian distribution with mean zero and standard deviation \f(CW$sigma\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_gaussian($sigma,[list of integers = output piddle dims]); \& $rng\->ran_gaussian($sigma, $output_piddle); .Ve .PP Example: .PP .Vb 2 \& $o = $rng\->ran_gaussian($sigma,10,10); \& $rng\->ran_gaussian($sigma,$a); .Ve .SS "ran_gaussian_var" .IX Subsection "ran_gaussian_var" This method is similar to ran_gaussian except that it takes the parameters of the distribution as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_gaussian_var($sigma_piddle); \& $rng\->ran_gaussian_var($sigma_piddle, $output_piddle); .Ve .PP Example: .PP .Vb 2 \& $sigma_pdl = rvals zeroes 11,11; \& $o = $rng\->ran_gaussian_var($sigma_pdl); .Ve .SS "ran_additive_gaussian" .IX Subsection "ran_additive_gaussian" Add Gaussian noise of given sigma to a piddle. .PP Usage: .PP .Vb 1 \& $rng\->ran_additive_gaussian($sigma,$piddle); .Ve .PP Example: .PP .Vb 1 \& $rng\->ran_additive_gaussian(1,$image); .Ve .SS "ran_bivariate_gaussian" .IX Subsection "ran_bivariate_gaussian" Generates \f(CW$n\fR bivariate gaussian random deviates. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_bivariate_gaussian($sigma_x,$sigma_y,$rho,$n); .Ve .PP Example: .PP .Vb 1 \& $o = $rng\->ran_bivariate_gaussian(1,2,0.5,1000); .Ve .SS "ran_poisson" .IX Subsection "ran_poisson" Fills output piddle by with random integer values from the Poisson distribution with mean \f(CW$mu\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_poisson($mu,[list of integers = output piddle dims]); \& $rng\->ran_poisson($mu,$output_piddle); .Ve .SS "ran_poisson_var" .IX Subsection "ran_poisson_var" Similar to ran_poisson except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_poisson_var($mu_piddle); .Ve .SS "ran_additive_poisson" .IX Subsection "ran_additive_poisson" Add Poisson noise of given \f(CW$mu\fR to a \f(CW$piddle\fR. .PP Usage: .PP .Vb 1 \& $rng\->ran_additive_poisson($mu,$piddle); .Ve .PP Example: .PP .Vb 1 \& $rng\->ran_additive_poisson(1,$image); .Ve .SS "ran_feed_poisson" .IX Subsection "ran_feed_poisson" This method simulates shot noise, taking the values of piddle as values for \f(CW$mu\fR to be fed in the poissonian \s-1RNG.\s0 .PP Usage: .PP .Vb 1 \& $rng\->ran_feed_poisson($piddle); .Ve .PP Example: .PP .Vb 1 \& $rng\->ran_feed_poisson($image); .Ve .SS "ran_bernoulli" .IX Subsection "ran_bernoulli" Fills output piddle with random values 0 or 1, the result of a Bernoulli trial with probability \f(CW$p\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_bernoulli($p,[list of integers = output piddle dims]); \& $rng\->ran_bernoulli($p,$output_piddle); .Ve .SS "ran_bernoulli_var" .IX Subsection "ran_bernoulli_var" Similar to ran_bernoulli except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_bernoulli_var($p_piddle); .Ve .SS "ran_beta" .IX Subsection "ran_beta" Fills output piddle with random variates from the beta distribution with parameters \f(CW$a\fR and \f(CW$b\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_beta($a,$b,[list of integers = output piddle dims]); \& $rng\->ran_beta($a,$b,$output_piddle); .Ve .SS "ran_beta_var" .IX Subsection "ran_beta_var" Similar to ran_beta except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_beta_var($a_piddle, $b_piddle); .Ve .SS "ran_binomial" .IX Subsection "ran_binomial" Fills output piddle with random integer values from the binomial distribution, the number of successes in \f(CW$n\fR independent trials with probability \f(CW$p\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_binomial($p,$n,[list of integers = output piddle dims]); \& $rng\->ran_binomial($p,$n,$output_piddle); .Ve .SS "ran_binomial_var" .IX Subsection "ran_binomial_var" Similar to ran_binomial except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_binomial_var($p_piddle, $n_piddle); .Ve .SS "ran_cauchy" .IX Subsection "ran_cauchy" Fills output piddle with random variates from the Cauchy distribution with scale parameter \f(CW$a\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_cauchy($a,[list of integers = output piddle dims]); \& $rng\->ran_cauchy($a,$output_piddle); .Ve .SS "ran_cauchy_var" .IX Subsection "ran_cauchy_var" Similar to ran_cauchy except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_cauchy_var($a_piddle); .Ve .SS "ran_chisq" .IX Subsection "ran_chisq" Fills output piddle with random variates from the chi-squared distribution with \&\f(CW$nu\fR degrees of freedom. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_chisq($nu,[list of integers = output piddle dims]); \& $rng\->ran_chisq($nu,$output_piddle); .Ve .SS "ran_chisq_var" .IX Subsection "ran_chisq_var" Similar to ran_chisq except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_chisq_var($nu_piddle); .Ve .SS "ran_exponential" .IX Subsection "ran_exponential" Fills output piddle with random variates from the exponential distribution with mean \f(CW$mu\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_exponential($mu,[list of integers = output piddle dims]); \& $rng\->ran_exponential($mu,$output_piddle); .Ve .SS "ran_exponential_var" .IX Subsection "ran_exponential_var" Similar to ran_exponential except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_exponential_var($mu_piddle); .Ve .SS "ran_exppow" .IX Subsection "ran_exppow" Fills output piddle with random variates from the exponential power distribution with scale parameter \f(CW$a\fR and exponent \f(CW$b\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_exppow($mu,$a,[list of integers = output piddle dims]); \& $rng\->ran_exppow($mu,$a,$output_piddle); .Ve .SS "ran_exppow_var" .IX Subsection "ran_exppow_var" Similar to ran_exppow except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_exppow_var($mu_piddle, $a_piddle); .Ve .SS "ran_fdist" .IX Subsection "ran_fdist" Fills output piddle with random variates from the F\-distribution with degrees of freedom \f(CW$nu1\fR and \f(CW$nu2\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_fdist($nu1, $nu2,[list of integers = output piddle dims]); \& $rng\->ran_fdist($nu1, $nu2,$output_piddle); .Ve .SS "ran_fdist_var" .IX Subsection "ran_fdist_var" Similar to ran_fdist except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_fdist_var($nu1_piddle, $nu2_piddle); .Ve .SS "ran_flat" .IX Subsection "ran_flat" Fills output piddle with random variates from the flat (uniform) distribution from \f(CW$a\fR to \f(CW$b\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_flat($a,$b,[list of integers = output piddle dims]); \& $rng\->ran_flat($a,$b,$output_piddle); .Ve .SS "ran_flat_var" .IX Subsection "ran_flat_var" Similar to ran_flat except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_flat_var($a_piddle, $b_piddle); .Ve .SS "ran_gamma" .IX Subsection "ran_gamma" Fills output piddle with random variates from the gamma distribution. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_gamma($a,$b,[list of integers = output piddle dims]); \& $rng\->ran_gamma($a,$b,$output_piddle); .Ve .SS "ran_gamma_var" .IX Subsection "ran_gamma_var" Similar to ran_gamma except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_gamma_var($a_piddle, $b_piddle); .Ve .SS "ran_geometric" .IX Subsection "ran_geometric" Fills output piddle with random integer values from the geometric distribution, the number of independent trials with probability \f(CW$p\fR until the first success. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_geometric($p,[list of integers = output piddle dims]); \& $rng\->ran_geometric($p,$output_piddle); .Ve .SS "ran_geometric_var" .IX Subsection "ran_geometric_var" Similar to ran_geometric except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_geometric_var($p_piddle); .Ve .SS "ran_gumbel1" .IX Subsection "ran_gumbel1" Fills output piddle with random variates from the Type\-1 Gumbel distribution. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_gumbel1($a,$b,[list of integers = output piddle dims]); \& $rng\->ran_gumbel1($a,$b,$output_piddle); .Ve .SS "ran_gumbel1_var" .IX Subsection "ran_gumbel1_var" Similar to ran_gumbel1 except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_gumbel1_var($a_piddle, $b_piddle); .Ve .SS "ran_gumbel2" .IX Subsection "ran_gumbel2" Fills output piddle with random variates from the Type\-2 Gumbel distribution. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_gumbel2($a,$b,[list of integers = output piddle dims]); \& $rng\->ran_gumbel2($a,$b,$output_piddle); .Ve .SS "ran_gumbel2_var" .IX Subsection "ran_gumbel2_var" Similar to ran_gumbel2 except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_gumbel2_var($a_piddle, $b_piddle); .Ve .SS "ran_hypergeometric" .IX Subsection "ran_hypergeometric" Fills output piddle with random integer values from the hypergeometric distribution. If a population contains \f(CW$n1\fR elements of type 1 and \f(CW$n2\fR elements of type 2 then the hypergeometric distribution gives the probability of obtaining \&\f(CW$x\fR elements of type 1 in \f(CW$t\fR samples from the population without replacement. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_hypergeometric($n1, $n2, $t,[list of integers = output piddle dims]); \& $rng\->ran_hypergeometric($n1, $n2, $t,$output_piddle); .Ve .SS "ran_hypergeometric_var" .IX Subsection "ran_hypergeometric_var" Similar to ran_hypergeometric except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_hypergeometric_var($n1_piddle, $n2_piddle, $t_piddle); .Ve .SS "ran_laplace" .IX Subsection "ran_laplace" Fills output piddle with random variates from the Laplace distribution with width \f(CW$a\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_laplace($a,[list of integers = output piddle dims]); \& $rng\->ran_laplace($a,$output_piddle); .Ve .SS "ran_laplace_var" .IX Subsection "ran_laplace_var" Similar to ran_laplace except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_laplace_var($a_piddle); .Ve .SS "ran_levy" .IX Subsection "ran_levy" Fills output piddle with random variates from the Levy symmetric stable distribution with scale \f(CW$c\fR and exponent \f(CW$alpha\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_levy($mu,$a,[list of integers = output piddle dims]); \& $rng\->ran_levy($mu,$a,$output_piddle); .Ve .SS "ran_levy_var" .IX Subsection "ran_levy_var" Similar to ran_levy except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_levy_var($mu_piddle, $a_piddle); .Ve .SS "ran_logarithmic" .IX Subsection "ran_logarithmic" Fills output piddle with random integer values from the logarithmic distribution. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_logarithmic($p,[list of integers = output piddle dims]); \& $rng\->ran_logarithmic($p,$output_piddle); .Ve .SS "ran_logarithmic_var" .IX Subsection "ran_logarithmic_var" Similar to ran_logarithmic except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_logarithmic_var($p_piddle); .Ve .SS "ran_logistic" .IX Subsection "ran_logistic" Fills output piddle with random random variates from the logistic distribution. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_logistic($m,[list of integers = output piddle dims]u) \& $rng\->ran_logistic($m,$output_piddle) .Ve .SS "ran_logistic_var" .IX Subsection "ran_logistic_var" Similar to ran_logistic except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_logistic_var($m_piddle); .Ve .SS "ran_lognormal" .IX Subsection "ran_lognormal" Fills output piddle with random variates from the lognormal distribution with parameters \f(CW$mu\fR (location) and \f(CW$sigma\fR (scale). .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_lognormal($mu,$sigma,[list of integers = output piddle dims]); \& $rng\->ran_lognormal($mu,$sigma,$output_piddle); .Ve .SS "ran_lognormal_var" .IX Subsection "ran_lognormal_var" Similar to ran_lognormal except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_lognormal_var($mu_piddle, $sigma_piddle); .Ve .SS "ran_negative_binomial" .IX Subsection "ran_negative_binomial" Fills output piddle with random integer values from the negative binomial distribution, the number of failures occurring before \f(CW$n\fR successes in independent trials with probability \f(CW$p\fR of success. Note that \f(CW$n\fR is not required to be an integer. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_negative_binomial($p,$n,[list of integers = output piddle dims]); \& $rng\->ran_negative_binomial($p,$n,$output_piddle); .Ve .SS "ran_negative_binomial_var" .IX Subsection "ran_negative_binomial_var" Similar to ran_negative_binomial except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_negative_binomial_var($p_piddle, $n_piddle); .Ve .SS "ran_pareto" .IX Subsection "ran_pareto" Fills output piddle with random variates from the Pareto distribution of order \f(CW$a\fR and scale \f(CW$b\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_pareto($a,$b,[list of integers = output piddle dims]); \& $rng\->ran_pareto($a,$b,$output_piddle); .Ve .SS "ran_pareto_var" .IX Subsection "ran_pareto_var" Similar to ran_pareto except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_pareto_var($a_piddle, $b_piddle); .Ve .SS "ran_pascal" .IX Subsection "ran_pascal" Fills output piddle with random integer values from the Pascal distribution. The Pascal distribution is simply a negative binomial distribution (see ran_negative_binomial) with an integer value of \f(CW$n\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_pascal($p,$n,[list of integers = output piddle dims]); \& $rng\->ran_pascal($p,$n,$output_piddle); .Ve .SS "ran_pascal_var" .IX Subsection "ran_pascal_var" Similar to ran_pascal except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_pascal_var($p_piddle, $n_piddle); .Ve .SS "ran_rayleigh" .IX Subsection "ran_rayleigh" Fills output piddle with random variates from the Rayleigh distribution with scale parameter \f(CW$sigma\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_rayleigh($sigma,[list of integers = output piddle dims]); \& $rng\->ran_rayleigh($sigma,$output_piddle); .Ve .SS "ran_rayleigh_var" .IX Subsection "ran_rayleigh_var" Similar to ran_rayleigh except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_rayleigh_var($sigma_piddle); .Ve .SS "ran_rayleigh_tail" .IX Subsection "ran_rayleigh_tail" Fills output piddle with random variates from the tail of the Rayleigh distribution with scale parameter \f(CW$sigma\fR and a lower limit of \f(CW$a\fR. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_rayleigh_tail($a,$sigma,[list of integers = output piddle dims]); \& $rng\->ran_rayleigh_tail($a,$sigma,$output_piddle); .Ve .SS "ran_rayleigh_tail_var" .IX Subsection "ran_rayleigh_tail_var" Similar to ran_rayleigh_tail except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_rayleigh_tail_var($a_piddle, $sigma_piddle); .Ve .SS "ran_tdist" .IX Subsection "ran_tdist" Fills output piddle with random variates from the t\-distribution (\s-1AKA\s0 Student's t\-distribution) with \f(CW$nu\fR degrees of freedom. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_tdist($nu,[list of integers = output piddle dims]); \& $rng\->ran_tdist($nu,$output_piddle); .Ve .SS "ran_tdist_var" .IX Subsection "ran_tdist_var" Similar to ran_tdist except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_tdist_var($nu_piddle); .Ve .SS "ran_ugaussian_tail" .IX Subsection "ran_ugaussian_tail" Fills output piddle with random variates from the upper tail of a Gaussian distribution with \f(CW\*(C`standard deviation = 1\*(C'\fR (\s-1AKA\s0 unit Gaussian distribution). .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_ugaussian_tail($tail,[list of integers = output piddle dims]); \& $rng\->ran_ugaussian_tail($tail,$output_piddle); .Ve .SS "ran_ugaussian_tail_var" .IX Subsection "ran_ugaussian_tail_var" Similar to ran_ugaussian_tail except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_ugaussian_tail_var($tail_piddle); .Ve .SS "ran_weibull" .IX Subsection "ran_weibull" Fills output piddle with random variates from the Weibull distribution. .PP Usage: .PP .Vb 2 \& $piddle = $rng\->ran_weibull($mu,$a,[list of integers = output piddle dims]); \& $rng\->ran_weibull($mu,$a,$output_piddle); .Ve .SS "ran_weibull_var" .IX Subsection "ran_weibull_var" Similar to ran_weibull except that it takes the distribution parameters as a piddle and returns a piddle of equal dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_weibull_var($mu_piddle, $a_piddle); .Ve .SS "ran_dir" .IX Subsection "ran_dir" Returns \f(CW$n\fR random vectors in \f(CW$ndim\fR dimensions. .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_dir($ndim,$n); .Ve .PP Example: .PP .Vb 1 \& $o = $rng\->ran_dir($ndim,$n); .Ve .SS "ran_discrete_preproc" .IX Subsection "ran_discrete_preproc" This method returns a handle that must be used when calling ran_discrete. You specify the probability of the integer number that are returned by ran_discrete. .PP Usage: .PP .Vb 1 \& $discrete_dist_handle = $rng\->ran_discrete_preproc($double_piddle_prob); .Ve .PP Example: .PP .Vb 3 \& $prob = pdl [0.1,0.3,0.6]; \& $ddh = $rng\->ran_discrete_preproc($prob); \& $o = $rng\->ran_discrete($discrete_dist_handle,100); .Ve .SS "ran_discrete" .IX Subsection "ran_discrete" Is used to get the desired samples once a proper handle has been enstablished (see \fIran_discrete_preproc()\fR). .PP Usage: .PP .Vb 1 \& $piddle = $rng\->ran_discrete($discrete_dist_handle,$num); .Ve .PP Example: .PP .Vb 3 \& $prob = pdl [0.1,0.3,0.6]; \& $ddh = $rng\->ran_discrete_preproc($prob); \& $o = $rng\->ran_discrete($discrete_dist_handle,100); .Ve .SS "ran_ver" .IX Subsection "ran_ver" Returns a piddle with \f(CW$n\fR values generated by the Verhulst map from \f(CW$x0\fR and parameter \f(CW$r\fR. .PP Usage: .PP .Vb 1 \& $rng\->ran_ver($x0, $r, $n); .Ve .SS "ran_caos" .IX Subsection "ran_caos" Returns values from Verhuls map with \f(CW\*(C`$r=4.0\*(C'\fR and randomly chosen \&\f(CW$x0\fR. The values are scaled by \f(CW$m\fR. .PP Usage: .PP .Vb 1 \& $rng\->ran_caos($m,$n); .Ve .SH "BUGS" .IX Header "BUGS" Feedback is welcome. Log bugs in the \s-1PDL\s0 bug database (the database is always linked from ). .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1PDL\s0 .PP The \s-1GSL\s0 documentation is online at .SH "AUTHOR" .IX Header "AUTHOR" This file copyright (C) 1999 Christian Pellegrin Docs mangled by C. Soeller. All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file \&\s-1COPYING\s0 in the \s-1PDL\s0 distribution. If this file is separated from the \&\s-1PDL\s0 distribution, the copyright notice should be included in the file. .PP The \s-1GSL RNG\s0 and randist modules were written by James Theiler.