.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" 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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "RNG 3pm" .TH RNG 3pm "2023-06-17" "perl v5.36.0" "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()); \& \& $x=zeroes(5,5,5) \& \& $rng\->get_uniform($x); # inplace \& \& $y=$rng\->get_uniform(3,4,5); # creates new pdl .Ve .SH "NOMENCLATURE" .IX Header "NOMENCLATURE" Throughout this documentation we strive to use the same variables that are present in the original \s-1GSL\s0 documentation (see See Also). Oftentimes those variables are called \f(CW\*(C`a\*(C'\fR and \&\f(CW\*(C`b\*(C'\fR. Since good Perl coding practices discourage the use of Perl variables \f(CW$a\fR and \f(CW$b\fR, here we refer to Parameters \f(CW\*(C`a\*(C'\fR and \f(CW\*(C`b\*(C'\fR as \f(CW$pa\fR and \f(CW$pb\fR, respectively, and Limits (of domain or integration) as \f(CW$la\fR and \f(CW$lb\fR. .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 an ndarray with given dimensions or accepts an existing ndarray and fills it. \fBget()\fR returns integer values between a minimum and a maximum specific to every \s-1RNG.\s0 .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->get($list_of_integers) \& $rng\->get($ndarray); .Ve .PP Example: .PP .Vb 2 \& $x = zeroes 5,6; \& $o = $rng\->get(10,10); $rng\->get($x); .Ve .SS "get_int" .IX Subsection "get_int" This function creates an ndarray with given dimensions or accepts an existing ndarray and fills it. \fBget_int()\fR returns integer values between 0 and \f(CW$max\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->get($max, $list_of_integers) \& $rng\->get($max, $ndarray); .Ve .PP Example: .PP .Vb 2 \& $x = zeroes 5,6; $max=100; \& $o = $rng\->get(10,10); $rng\->get($x); .Ve .SS "get_uniform" .IX Subsection "get_uniform" This function creates an ndarray with given dimensions or accepts an existing ndarray and fills it. \fBget_uniform()\fR returns values 0<=x<1, .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->get_uniform($list_of_integers) \& $rng\->get_uniform($ndarray); .Ve .PP Example: .PP .Vb 2 \& $x = zeroes 5,6; $max=100; \& $o = $rng\->get_uniform(10,10); $rng\->get_uniform($x); .Ve .SS "get_uniform_pos" .IX Subsection "get_uniform_pos" This function creates an ndarray with given dimensions or accepts an existing ndarray and fills it. \fBget_uniform_pos()\fR returns values 0get_uniform_pos($list_of_integers) \& $rng\->get_uniform_pos($ndarray); .Ve .PP Example: .PP .Vb 2 \& $x = zeroes 5,6; \& $o = $rng\->get_uniform_pos(10,10); $rng\->get_uniform_pos($x); .Ve .SS "ran_shuffle" .IX Subsection "ran_shuffle" Shuffles values in ndarray .PP Usage: .PP .Vb 1 \& $rng\->ran_shuffle($ndarray); .Ve .SS "ran_shuffle_vec" .IX Subsection "ran_shuffle_vec" Shuffles values in ndarray .PP Usage: .PP .Vb 1 \& $rng\->ran_shuffle_vec(@vec); .Ve .SS "ran_choose" .IX Subsection "ran_choose" Chooses values from \f(CW$inndarray\fR to \f(CW$outndarray\fR. .PP Usage: .PP .Vb 1 \& $rng\->ran_choose($inndarray,$outndarray); .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 ndarray with random values from Gaussian distribution with mean zero and standard deviation \f(CW$sigma\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_gaussian($sigma,[list of integers = output ndarray dims]); \& $rng\->ran_gaussian($sigma, $output_ndarray); .Ve .PP Example: .PP .Vb 2 \& $o = $rng\->ran_gaussian($sigma,10,10); \& $rng\->ran_gaussian($sigma,$o); .Ve .SS "ran_gaussian_var" .IX Subsection "ran_gaussian_var" This method is similar to \*(L"ran_gaussian\*(R" except that it takes the parameters of the distribution as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_gaussian_var($sigma_ndarray); \& $rng\->ran_gaussian_var($sigma_ndarray, $output_ndarray); .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 an ndarray. .PP Usage: .PP .Vb 1 \& $rng\->ran_additive_gaussian($sigma,$ndarray); .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 \& $ndarray = $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 ndarray by with random integer values from the Poisson distribution with mean \f(CW$mu\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_poisson($mu,[list of integers = output ndarray dims]); \& $rng\->ran_poisson($mu,$output_ndarray); .Ve .SS "ran_poisson_var" .IX Subsection "ran_poisson_var" Similar to \*(L"ran_poisson\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_poisson_var($mu_ndarray); .Ve .SS "ran_additive_poisson" .IX Subsection "ran_additive_poisson" Add Poisson noise of given \f(CW$mu\fR to a \f(CW$ndarray\fR. .PP Usage: .PP .Vb 1 \& $rng\->ran_additive_poisson($mu,$ndarray); .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 ndarray 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($ndarray); .Ve .PP Example: .PP .Vb 1 \& $rng\->ran_feed_poisson($image); .Ve .SS "ran_bernoulli" .IX Subsection "ran_bernoulli" Fills output ndarray with random values 0 or 1, the result of a Bernoulli trial with probability \f(CW$p\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_bernoulli($p,[list of integers = output ndarray dims]); \& $rng\->ran_bernoulli($p,$output_ndarray); .Ve .SS "ran_bernoulli_var" .IX Subsection "ran_bernoulli_var" Similar to \*(L"ran_bernoulli\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_bernoulli_var($p_ndarray); .Ve .SS "ran_beta" .IX Subsection "ran_beta" Fills output ndarray with random variates from the beta distribution with parameters \f(CW$pa\fR and \f(CW$pb\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_beta($pa,$pb,[list of integers = output ndarray dims]); \& $rng\->ran_beta($pa,$pb,$output_ndarray); .Ve .SS "ran_beta_var" .IX Subsection "ran_beta_var" Similar to \*(L"ran_beta\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_beta_var($a_ndarray, $b_ndarray); .Ve .SS "ran_binomial" .IX Subsection "ran_binomial" Fills output ndarray 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 \& $ndarray = $rng\->ran_binomial($p,$n,[list of integers = output ndarray dims]); \& $rng\->ran_binomial($p,$n,$output_ndarray); .Ve .SS "ran_binomial_var" .IX Subsection "ran_binomial_var" Similar to \*(L"ran_binomial\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_binomial_var($p_ndarray, $n_ndarray); .Ve .SS "ran_cauchy" .IX Subsection "ran_cauchy" Fills output ndarray with random variates from the Cauchy distribution with scale parameter \f(CW$pa\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_cauchy($pa,[list of integers = output ndarray dims]); \& $rng\->ran_cauchy($pa,$output_ndarray); .Ve .SS "ran_cauchy_var" .IX Subsection "ran_cauchy_var" Similar to \*(L"ran_cauchy\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_cauchy_var($a_ndarray); .Ve .SS "ran_chisq" .IX Subsection "ran_chisq" Fills output ndarray with random variates from the chi-squared distribution with \&\f(CW$nu\fR degrees of freedom. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_chisq($nu,[list of integers = output ndarray dims]); \& $rng\->ran_chisq($nu,$output_ndarray); .Ve .SS "ran_chisq_var" .IX Subsection "ran_chisq_var" Similar to \*(L"ran_chisq\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_chisq_var($nu_ndarray); .Ve .SS "ran_exponential" .IX Subsection "ran_exponential" Fills output ndarray with random variates from the exponential distribution with mean \f(CW$mu\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_exponential($mu,[list of integers = output ndarray dims]); \& $rng\->ran_exponential($mu,$output_ndarray); .Ve .SS "ran_exponential_var" .IX Subsection "ran_exponential_var" Similar to \*(L"ran_exponential\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_exponential_var($mu_ndarray); .Ve .SS "ran_exppow" .IX Subsection "ran_exppow" Fills output ndarray with random variates from the exponential power distribution with scale parameter \f(CW$pa\fR and exponent \f(CW$pb\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_exppow($pa,$pb,[list of integers = output ndarray dims]); \& $rng\->ran_exppow($pa,$pb,$output_ndarray); .Ve .SS "ran_exppow_var" .IX Subsection "ran_exppow_var" Similar to \*(L"ran_exppow\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_exppow_var($a_ndarray, $b_ndarray); .Ve .SS "ran_fdist" .IX Subsection "ran_fdist" Fills output ndarray 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 \& $ndarray = $rng\->ran_fdist($nu1, $nu2,[list of integers = output ndarray dims]); \& $rng\->ran_fdist($nu1, $nu2,$output_ndarray); .Ve .SS "ran_fdist_var" .IX Subsection "ran_fdist_var" Similar to \*(L"ran_fdist\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_fdist_var($nu1_ndarray, $nu2_ndarray); .Ve .SS "ran_flat" .IX Subsection "ran_flat" Fills output ndarray with random variates from the flat (uniform) distribution from \f(CW$la\fR to \f(CW$lb\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_flat($la,$lb,[list of integers = output ndarray dims]); \& $rng\->ran_flat($la,$lb,$output_ndarray); .Ve .SS "ran_flat_var" .IX Subsection "ran_flat_var" Similar to \*(L"ran_flat\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_flat_var($a_ndarray, $b_ndarray); .Ve .SS "ran_gamma" .IX Subsection "ran_gamma" Fills output ndarray with random variates from the gamma distribution. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_gamma($pa,$pb,[list of integers = output ndarray dims]); \& $rng\->ran_gamma($pa,$pb,$output_ndarray); .Ve .SS "ran_gamma_var" .IX Subsection "ran_gamma_var" Similar to \*(L"ran_gamma\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_gamma_var($a_ndarray, $b_ndarray); .Ve .SS "ran_geometric" .IX Subsection "ran_geometric" Fills output ndarray 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 \& $ndarray = $rng\->ran_geometric($p,[list of integers = output ndarray dims]); \& $rng\->ran_geometric($p,$output_ndarray); .Ve .SS "ran_geometric_var" .IX Subsection "ran_geometric_var" Similar to \*(L"ran_geometric\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_geometric_var($p_ndarray); .Ve .SS "ran_gumbel1" .IX Subsection "ran_gumbel1" Fills output ndarray with random variates from the Type\-1 Gumbel distribution. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_gumbel1($pa,$pb,[list of integers = output ndarray dims]); \& $rng\->ran_gumbel1($pa,$pb,$output_ndarray); .Ve .SS "ran_gumbel1_var" .IX Subsection "ran_gumbel1_var" Similar to \*(L"ran_gumbel1\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_gumbel1_var($a_ndarray, $b_ndarray); .Ve .SS "ran_gumbel2" .IX Subsection "ran_gumbel2" Fills output ndarray with random variates from the Type\-2 Gumbel distribution. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_gumbel2($pa,$pb,[list of integers = output ndarray dims]); \& $rng\->ran_gumbel2($pa,$pb,$output_ndarray); .Ve .SS "ran_gumbel2_var" .IX Subsection "ran_gumbel2_var" Similar to \*(L"ran_gumbel2\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_gumbel2_var($a_ndarray, $b_ndarray); .Ve .SS "ran_hypergeometric" .IX Subsection "ran_hypergeometric" Fills output ndarray 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 \& $ndarray = $rng\->ran_hypergeometric($n1, $n2, $t,[list of integers = output ndarray dims]); \& $rng\->ran_hypergeometric($n1, $n2, $t,$output_ndarray); .Ve .SS "ran_hypergeometric_var" .IX Subsection "ran_hypergeometric_var" Similar to \*(L"ran_hypergeometric\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_hypergeometric_var($n1_ndarray, $n2_ndarray, $t_ndarray); .Ve .SS "ran_laplace" .IX Subsection "ran_laplace" Fills output ndarray with random variates from the Laplace distribution with width \f(CW$pa\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_laplace($pa,[list of integers = output ndarray dims]); \& $rng\->ran_laplace($pa,$output_ndarray); .Ve .SS "ran_laplace_var" .IX Subsection "ran_laplace_var" Similar to \*(L"ran_laplace\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_laplace_var($a_ndarray); .Ve .SS "ran_levy" .IX Subsection "ran_levy" Fills output ndarray 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 \& $ndarray = $rng\->ran_levy($mu,$x,[list of integers = output ndarray dims]); \& $rng\->ran_levy($mu,$x,$output_ndarray); .Ve .SS "ran_levy_var" .IX Subsection "ran_levy_var" Similar to \*(L"ran_levy\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_levy_var($mu_ndarray, $a_ndarray); .Ve .SS "ran_logarithmic" .IX Subsection "ran_logarithmic" Fills output ndarray with random integer values from the logarithmic distribution. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_logarithmic($p,[list of integers = output ndarray dims]); \& $rng\->ran_logarithmic($p,$output_ndarray); .Ve .SS "ran_logarithmic_var" .IX Subsection "ran_logarithmic_var" Similar to \*(L"ran_logarithmic\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_logarithmic_var($p_ndarray); .Ve .SS "ran_logistic" .IX Subsection "ran_logistic" Fills output ndarray with random random variates from the logistic distribution. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_logistic($m,[list of integers = output ndarray dims]u) \& $rng\->ran_logistic($m,$output_ndarray) .Ve .SS "ran_logistic_var" .IX Subsection "ran_logistic_var" Similar to \*(L"ran_logistic\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_logistic_var($m_ndarray); .Ve .SS "ran_lognormal" .IX Subsection "ran_lognormal" Fills output ndarray 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 \& $ndarray = $rng\->ran_lognormal($mu,$sigma,[list of integers = output ndarray dims]); \& $rng\->ran_lognormal($mu,$sigma,$output_ndarray); .Ve .SS "ran_lognormal_var" .IX Subsection "ran_lognormal_var" Similar to \*(L"ran_lognormal\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_lognormal_var($mu_ndarray, $sigma_ndarray); .Ve .SS "ran_negative_binomial" .IX Subsection "ran_negative_binomial" Fills output ndarray 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 \& $ndarray = $rng\->ran_negative_binomial($p,$n,[list of integers = output ndarray dims]); \& $rng\->ran_negative_binomial($p,$n,$output_ndarray); .Ve .SS "ran_negative_binomial_var" .IX Subsection "ran_negative_binomial_var" Similar to \*(L"ran_negative_binomial\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_negative_binomial_var($p_ndarray, $n_ndarray); .Ve .SS "ran_pareto" .IX Subsection "ran_pareto" Fills output ndarray with random variates from the Pareto distribution of order \f(CW$pa\fR and scale \f(CW$lb\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_pareto($pa,$lb,[list of integers = output ndarray dims]); \& $rng\->ran_pareto($pa,$lb,$output_ndarray); .Ve .SS "ran_pareto_var" .IX Subsection "ran_pareto_var" Similar to \*(L"ran_pareto\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_pareto_var($a_ndarray, $b_ndarray); .Ve .SS "ran_pascal" .IX Subsection "ran_pascal" Fills output ndarray with random integer values from the Pascal distribution. The Pascal distribution is simply a negative binomial distribution (see \*(L"ran_negative_binomial\*(R") with an integer value of \f(CW$n\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_pascal($p,$n,[list of integers = output ndarray dims]); \& $rng\->ran_pascal($p,$n,$output_ndarray); .Ve .SS "ran_pascal_var" .IX Subsection "ran_pascal_var" Similar to \*(L"ran_pascal\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_pascal_var($p_ndarray, $n_ndarray); .Ve .SS "ran_rayleigh" .IX Subsection "ran_rayleigh" Fills output ndarray with random variates from the Rayleigh distribution with scale parameter \f(CW$sigma\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_rayleigh($sigma,[list of integers = output ndarray dims]); \& $rng\->ran_rayleigh($sigma,$output_ndarray); .Ve .SS "ran_rayleigh_var" .IX Subsection "ran_rayleigh_var" Similar to \*(L"ran_rayleigh\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_rayleigh_var($sigma_ndarray); .Ve .SS "ran_rayleigh_tail" .IX Subsection "ran_rayleigh_tail" Fills output ndarray with random variates from the tail of the Rayleigh distribution with scale parameter \f(CW$sigma\fR and a lower limit of \f(CW$la\fR. .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_rayleigh_tail($la,$sigma,[list of integers = output ndarray dims]); \& $rng\->ran_rayleigh_tail($x,$sigma,$output_ndarray); .Ve .SS "ran_rayleigh_tail_var" .IX Subsection "ran_rayleigh_tail_var" Similar to \*(L"ran_rayleigh_tail\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_rayleigh_tail_var($a_ndarray, $sigma_ndarray); .Ve .SS "ran_tdist" .IX Subsection "ran_tdist" Fills output ndarray 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 \& $ndarray = $rng\->ran_tdist($nu,[list of integers = output ndarray dims]); \& $rng\->ran_tdist($nu,$output_ndarray); .Ve .SS "ran_tdist_var" .IX Subsection "ran_tdist_var" Similar to \*(L"ran_tdist\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_tdist_var($nu_ndarray); .Ve .SS "ran_ugaussian_tail" .IX Subsection "ran_ugaussian_tail" Fills output ndarray 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 \& $ndarray = $rng\->ran_ugaussian_tail($tail,[list of integers = output ndarray dims]); \& $rng\->ran_ugaussian_tail($tail,$output_ndarray); .Ve .SS "ran_ugaussian_tail_var" .IX Subsection "ran_ugaussian_tail_var" Similar to \*(L"ran_ugaussian_tail\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_ugaussian_tail_var($tail_ndarray); .Ve .SS "ran_weibull" .IX Subsection "ran_weibull" Fills output ndarray with random variates from the Weibull distribution with scale \f(CW$pa\fR and exponent \f(CW$pb\fR. (Some literature uses \f(CW\*(C`lambda\*(C'\fR for \f(CW$pa\fR and \f(CW\*(C`k\*(C'\fR for \f(CW$pb\fR.) .PP Usage: .PP .Vb 2 \& $ndarray = $rng\->ran_weibull($pa,$pb,[list of integers = output ndarray dims]); \& $rng\->ran_weibull($pa,$pb,$output_ndarray); .Ve .SS "ran_weibull_var" .IX Subsection "ran_weibull_var" Similar to \*(L"ran_weibull\*(R" except that it takes the distribution parameters as an ndarray and returns an ndarray of equal dimensions. .PP Usage: .PP .Vb 1 \& $ndarray = $rng\->ran_weibull_var($a_ndarray, $b_ndarray); .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 \& $ndarray = $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 \&\*(L"ran_discrete\*(R". You specify the probability of the integer number that are returned by \*(L"ran_discrete\*(R". .PP Usage: .PP .Vb 1 \& $discrete_dist_handle = $rng\->ran_discrete_preproc($double_ndarray_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 \fBran_discrete_preproc()\fR). .PP Usage: .PP .Vb 1 \& $ndarray = $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 an ndarray 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 for random number distributions 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.