.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 2024-05-12 "perl v5.38.2" "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 GNU 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 GSL 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 RNG. .PP The available RNGs are: .IP coveyou 4 .IX Item "coveyou" .PD 0 .IP cmrg 4 .IX Item "cmrg" .IP fishman18 4 .IX Item "fishman18" .IP fishman20 4 .IX Item "fishman20" .IP fishman2x 4 .IX Item "fishman2x" .IP gfsr4 4 .IX Item "gfsr4" .IP knuthran 4 .IX Item "knuthran" .IP knuthran2 4 .IX Item "knuthran2" .IP knuthran2002 4 .IX Item "knuthran2002" .IP lecuyer21 4 .IX Item "lecuyer21" .IP minstd 4 .IX Item "minstd" .IP mrg 4 .IX Item "mrg" .IP mt19937 4 .IX Item "mt19937" .IP mt19937_1999 4 .IX Item "mt19937_1999" .IP mt19937_1998 4 .IX Item "mt19937_1998" .IP r250 4 .IX Item "r250" .IP ran0 4 .IX Item "ran0" .IP ran1 4 .IX Item "ran1" .IP ran2 4 .IX Item "ran2" .IP ran3 4 .IX Item "ran3" .IP rand 4 .IX Item "rand" .IP rand48 4 .IX Item "rand48" .IP random128_bsd 4 .IX Item "random128_bsd" .IP random128_glibc2 4 .IX Item "random128_glibc2" .IP random128_libc5 4 .IX Item "random128_libc5" .IP random256_bsd 4 .IX Item "random256_bsd" .IP random256_glibc2 4 .IX Item "random256_glibc2" .IP random256_libc5 4 .IX Item "random256_libc5" .IP random32_bsd 4 .IX Item "random32_bsd" .IP random32_glibc2 4 .IX Item "random32_glibc2" .IP random32_libc5 4 .IX Item "random32_libc5" .IP random64_bsd 4 .IX Item "random64_bsd" .IP random64_glibc2 4 .IX Item "random64_glibc2" .IP random64_libc5 4 .IX Item "random64_libc5" .IP random8_bsd 4 .IX Item "random8_bsd" .IP random8_glibc2 4 .IX Item "random8_glibc2" .IP random8_libc5 4 .IX Item "random8_libc5" .IP random_bsd 4 .IX Item "random_bsd" .IP random_glibc2 4 .IX Item "random_glibc2" .IP random_libc5 4 .IX Item "random_libc5" .IP randu 4 .IX Item "randu" .IP ranf 4 .IX Item "ranf" .IP ranlux 4 .IX Item "ranlux" .IP ranlux389 4 .IX Item "ranlux389" .IP ranlxd1 4 .IX Item "ranlxd1" .IP ranlxd2 4 .IX Item "ranlxd2" .IP ranlxs0 4 .IX Item "ranlxs0" .IP ranlxs1 4 .IX Item "ranlxs1" .IP ranlxs2 4 .IX Item "ranlxs2" .IP ranmar 4 .IX Item "ranmar" .IP slatec 4 .IX Item "slatec" .IP taus 4 .IX Item "taus" .IP taus2 4 .IX Item "taus2" .IP taus113 4 .IX Item "taus113" .IP transputer 4 .IX Item "transputer" .IP tt800 4 .IX Item "tt800" .IP uni 4 .IX Item "uni" .IP uni32 4 .IX Item "uni32" .IP vax 4 .IX Item "vax" .IP waterman14 4 .IX Item "waterman14" .IP zuf 4 .IX Item "zuf" .IP default 4 .IX Item "default" .PD .PP The last one (default) uses the environment variable GSL_RNG_TYPE. .PP Note that only a few of these rngs are recommended for general use. Please check the GSL 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 RNG 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 RNG. .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 RNG. .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 RNG. .PP Usage: .PP .Vb 1 \& $string = $rng\->name(); .Ve .PP Example: .PP .Vb 1 \& $name = $rng\->name(); .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_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 "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_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 get_uniform .IX Subsection "get_uniform" .Vb 1 \& Signature: ([o]a(); IV rng) .Ve .PP 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 .PP get_uniform does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS get_uniform_pos .IX Subsection "get_uniform_pos" .Vb 1 \& Signature: ([o]a(); IV rng) .Ve .PP 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 .PP get_uniform_pos does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS get .IX Subsection "get" .Vb 1 \& Signature: ([o]a(); IV rng) .Ve .PP 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 RNG. .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 .PP get does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS get_int .IX Subsection "get_int" .Vb 1 \& Signature: ([o]a(); int n; IV rng) .Ve .PP 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 .PP get_int does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_gaussian .IX Subsection "ran_gaussian" .Vb 1 \& Signature: ([o]output(); double sigma; IV rng) .Ve .PP 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 .PP ran_gaussian does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_gaussian_var .IX Subsection "ran_gaussian_var" .Vb 1 \& Signature: (sigma();[o]output(); IV rng) .Ve .PP Similar to "ran_gaussian" 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_gaussian_var($sigma_ndarray); .Ve .PP ran_gaussian_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_ugaussian_tail .IX Subsection "ran_ugaussian_tail" .Vb 1 \& Signature: ([o]output(); double tail; IV rng) .Ve .PP Fills output ndarray with random variates from the upper tail of a Gaussian distribution with \f(CW\*(C`standard deviation = 1\*(C'\fR (AKA 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_ugaussian_tail($tail,10,10); \& $rng\->ran_ugaussian_tail($tail,$o); .Ve .PP ran_ugaussian_tail does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_ugaussian_tail_var .IX Subsection "ran_ugaussian_tail_var" .Vb 1 \& Signature: (tail();[o]output(); IV rng) .Ve .PP Similar to "ran_ugaussian_tail" 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 .PP ran_ugaussian_tail_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_exponential .IX Subsection "ran_exponential" .Vb 1 \& Signature: ([o]output(); double mu; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_exponential($mu,10,10); \& $rng\->ran_exponential($mu,$o); .Ve .PP ran_exponential does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_exponential_var .IX Subsection "ran_exponential_var" .Vb 1 \& Signature: (mu();[o]output(); IV rng) .Ve .PP Similar to "ran_exponential" 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 .PP ran_exponential_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_laplace .IX Subsection "ran_laplace" .Vb 1 \& Signature: ([o]output(); double pa; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_laplace($pa,10,10); \& $rng\->ran_laplace($pa,$o); .Ve .PP ran_laplace does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_laplace_var .IX Subsection "ran_laplace_var" .Vb 1 \& Signature: (pa();[o]output(); IV rng) .Ve .PP Similar to "ran_laplace" 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($pa_ndarray); .Ve .PP ran_laplace_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_exppow .IX Subsection "ran_exppow" .Vb 1 \& Signature: ([o]output(); double pa; double pb; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_exppow($pa, $pb,10,10); \& $rng\->ran_exppow($pa, $pb,$o); .Ve .PP ran_exppow does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_exppow_var .IX Subsection "ran_exppow_var" .Vb 1 \& Signature: (pa();pb();[o]output(); IV rng) .Ve .PP Similar to "ran_exppow" 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($pa_ndarray,$pb_ndarray); .Ve .PP ran_exppow_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_cauchy .IX Subsection "ran_cauchy" .Vb 1 \& Signature: ([o]output(); double pa; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_cauchy($pa,10,10); \& $rng\->ran_cauchy($pa,$o); .Ve .PP ran_cauchy does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_cauchy_var .IX Subsection "ran_cauchy_var" .Vb 1 \& Signature: (pa();[o]output(); IV rng) .Ve .PP Similar to "ran_cauchy" 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($pa_ndarray); .Ve .PP ran_cauchy_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_rayleigh .IX Subsection "ran_rayleigh" .Vb 1 \& Signature: ([o]output(); double sigma; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_rayleigh($sigma,10,10); \& $rng\->ran_rayleigh($sigma,$o); .Ve .PP ran_rayleigh does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_rayleigh_var .IX Subsection "ran_rayleigh_var" .Vb 1 \& Signature: (sigma();[o]output(); IV rng) .Ve .PP Similar to "ran_rayleigh" 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 .PP ran_rayleigh_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_rayleigh_tail .IX Subsection "ran_rayleigh_tail" .Vb 1 \& Signature: ([o]output(); double x; double sigma; IV rng) .Ve .PP 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($x, $sigma,[list of integers = output ndarray dims]); \& $rng\->ran_rayleigh_tail($x, $sigma, $output_ndarray); .Ve .PP Example: .PP .Vb 2 \& $o = $rng\->ran_rayleigh_tail($x, $sigma,10,10); \& $rng\->ran_rayleigh_tail($x, $sigma,$o); .Ve .PP ran_rayleigh_tail does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_rayleigh_tail_var .IX Subsection "ran_rayleigh_tail_var" .Vb 1 \& Signature: (x();sigma();[o]output(); IV rng) .Ve .PP Similar to "ran_rayleigh_tail" 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($x_ndarray,$sigma_ndarray); .Ve .PP ran_rayleigh_tail_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_levy .IX Subsection "ran_levy" .Vb 1 \& Signature: ([o]output(); double mu; double x; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_levy($mu, $x,10,10); \& $rng\->ran_levy($mu, $x,$o); .Ve .PP ran_levy does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_levy_var .IX Subsection "ran_levy_var" .Vb 1 \& Signature: (mu();x();[o]output(); IV rng) .Ve .PP Similar to "ran_levy" 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,$x_ndarray); .Ve .PP ran_levy_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_gamma .IX Subsection "ran_gamma" .Vb 1 \& Signature: ([o]output(); double pa; double pb; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_gamma($pa, $pb,10,10); \& $rng\->ran_gamma($pa, $pb,$o); .Ve .PP ran_gamma does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_gamma_var .IX Subsection "ran_gamma_var" .Vb 1 \& Signature: (pa();pb();[o]output(); IV rng) .Ve .PP Similar to "ran_gamma" 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($pa_ndarray,$pb_ndarray); .Ve .PP ran_gamma_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_flat .IX Subsection "ran_flat" .Vb 1 \& Signature: ([o]output(); double la; double lb; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_flat($la, $lb,10,10); \& $rng\->ran_flat($la, $lb,$o); .Ve .PP ran_flat does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_flat_var .IX Subsection "ran_flat_var" .Vb 1 \& Signature: (la();lb();[o]output(); IV rng) .Ve .PP Similar to "ran_flat" 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($la_ndarray,$lb_ndarray); .Ve .PP ran_flat_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_lognormal .IX Subsection "ran_lognormal" .Vb 1 \& Signature: ([o]output(); double mu; double sigma; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_lognormal($mu, $sigma,10,10); \& $rng\->ran_lognormal($mu, $sigma,$o); .Ve .PP ran_lognormal does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_lognormal_var .IX Subsection "ran_lognormal_var" .Vb 1 \& Signature: (mu();sigma();[o]output(); IV rng) .Ve .PP Similar to "ran_lognormal" 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 .PP ran_lognormal_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_chisq .IX Subsection "ran_chisq" .Vb 1 \& Signature: ([o]output(); double nu; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_chisq($nu,10,10); \& $rng\->ran_chisq($nu,$o); .Ve .PP ran_chisq does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_chisq_var .IX Subsection "ran_chisq_var" .Vb 1 \& Signature: (nu();[o]output(); IV rng) .Ve .PP Similar to "ran_chisq" 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 .PP ran_chisq_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_fdist .IX Subsection "ran_fdist" .Vb 1 \& Signature: ([o]output(); double nu1; double nu2; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_fdist($nu1, $nu2,10,10); \& $rng\->ran_fdist($nu1, $nu2,$o); .Ve .PP ran_fdist does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_fdist_var .IX Subsection "ran_fdist_var" .Vb 1 \& Signature: (nu1();nu2();[o]output(); IV rng) .Ve .PP Similar to "ran_fdist" 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 .PP ran_fdist_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_tdist .IX Subsection "ran_tdist" .Vb 1 \& Signature: ([o]output(); double nu; IV rng) .Ve .PP Fills output ndarray with random variates from the t\-distribution (AKA 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_tdist($nu,10,10); \& $rng\->ran_tdist($nu,$o); .Ve .PP ran_tdist does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_tdist_var .IX Subsection "ran_tdist_var" .Vb 1 \& Signature: (nu();[o]output(); IV rng) .Ve .PP Similar to "ran_tdist" 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 .PP ran_tdist_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_beta .IX Subsection "ran_beta" .Vb 1 \& Signature: ([o]output(); double pa; double pb; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_beta($pa, $pb,10,10); \& $rng\->ran_beta($pa, $pb,$o); .Ve .PP ran_beta does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_beta_var .IX Subsection "ran_beta_var" .Vb 1 \& Signature: (pa();pb();[o]output(); IV rng) .Ve .PP Similar to "ran_beta" 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($pa_ndarray,$pb_ndarray); .Ve .PP ran_beta_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_logistic .IX Subsection "ran_logistic" .Vb 1 \& Signature: ([o]output(); double m; IV rng) .Ve .PP 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]); \& $rng\->ran_logistic($m, $output_ndarray); .Ve .PP Example: .PP .Vb 2 \& $o = $rng\->ran_logistic($m,10,10); \& $rng\->ran_logistic($m,$o); .Ve .PP ran_logistic does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_logistic_var .IX Subsection "ran_logistic_var" .Vb 1 \& Signature: (m();[o]output(); IV rng) .Ve .PP Similar to "ran_logistic" 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 .PP ran_logistic_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_pareto .IX Subsection "ran_pareto" .Vb 1 \& Signature: ([o]output(); double pa; double lb; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_pareto($pa, $lb,10,10); \& $rng\->ran_pareto($pa, $lb,$o); .Ve .PP ran_pareto does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_pareto_var .IX Subsection "ran_pareto_var" .Vb 1 \& Signature: (pa();lb();[o]output(); IV rng) .Ve .PP Similar to "ran_pareto" 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($pa_ndarray,$lb_ndarray); .Ve .PP ran_pareto_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_weibull .IX Subsection "ran_weibull" .Vb 1 \& Signature: ([o]output(); double pa; double pb; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_weibull($pa, $pb,10,10); \& $rng\->ran_weibull($pa, $pb,$o); .Ve .PP ran_weibull does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_weibull_var .IX Subsection "ran_weibull_var" .Vb 1 \& Signature: (pa();pb();[o]output(); IV rng) .Ve .PP Similar to "ran_weibull" 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($pa_ndarray,$pb_ndarray); .Ve .PP ran_weibull_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_gumbel1 .IX Subsection "ran_gumbel1" .Vb 1 \& Signature: ([o]output(); double pa; double pb; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_gumbel1($pa, $pb,10,10); \& $rng\->ran_gumbel1($pa, $pb,$o); .Ve .PP ran_gumbel1 does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_gumbel1_var .IX Subsection "ran_gumbel1_var" .Vb 1 \& Signature: (pa();pb();[o]output(); IV rng) .Ve .PP Similar to "ran_gumbel1" 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($pa_ndarray,$pb_ndarray); .Ve .PP ran_gumbel1_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_gumbel2 .IX Subsection "ran_gumbel2" .Vb 1 \& Signature: ([o]output(); double pa; double pb; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_gumbel2($pa, $pb,10,10); \& $rng\->ran_gumbel2($pa, $pb,$o); .Ve .PP ran_gumbel2 does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_gumbel2_var .IX Subsection "ran_gumbel2_var" .Vb 1 \& Signature: (pa();pb();[o]output(); IV rng) .Ve .PP Similar to "ran_gumbel2" 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($pa_ndarray,$pb_ndarray); .Ve .PP ran_gumbel2_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_poisson .IX Subsection "ran_poisson" .Vb 1 \& Signature: ([o]output(); double mu; IV rng) .Ve .PP Fills output ndarray 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_poisson($mu,10,10); \& $rng\->ran_poisson($mu,$o); .Ve .PP ran_poisson does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_poisson_var .IX Subsection "ran_poisson_var" .Vb 1 \& Signature: (mu();[o]output(); IV rng) .Ve .PP Similar to "ran_poisson" 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 .PP ran_poisson_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_bernoulli .IX Subsection "ran_bernoulli" .Vb 1 \& Signature: ([o]output(); double p; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_bernoulli($p,10,10); \& $rng\->ran_bernoulli($p,$o); .Ve .PP ran_bernoulli does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_bernoulli_var .IX Subsection "ran_bernoulli_var" .Vb 1 \& Signature: (p();[o]output(); IV rng) .Ve .PP Similar to "ran_bernoulli" 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 .PP ran_bernoulli_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_binomial .IX Subsection "ran_binomial" .Vb 1 \& Signature: ([o]output(); double p; double n; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_binomial($p, $n,10,10); \& $rng\->ran_binomial($p, $n,$o); .Ve .PP ran_binomial does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_binomial_var .IX Subsection "ran_binomial_var" .Vb 1 \& Signature: (p();n();[o]output(); IV rng) .Ve .PP Similar to "ran_binomial" 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 .PP ran_binomial_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_negative_binomial .IX Subsection "ran_negative_binomial" .Vb 1 \& Signature: ([o]output(); double p; double n; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_negative_binomial($p, $n,10,10); \& $rng\->ran_negative_binomial($p, $n,$o); .Ve .PP ran_negative_binomial does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_negative_binomial_var .IX Subsection "ran_negative_binomial_var" .Vb 1 \& Signature: (p();n();[o]output(); IV rng) .Ve .PP Similar to "ran_negative_binomial" 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 .PP ran_negative_binomial_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_pascal .IX Subsection "ran_pascal" .Vb 1 \& Signature: ([o]output(); double p; double n; IV rng) .Ve .PP Fills output ndarray 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 \& $ndarray = $rng\->ran_pascal($p, $n,[list of integers = output ndarray dims]); \& $rng\->ran_pascal($p, $n, $output_ndarray); .Ve .PP Example: .PP .Vb 2 \& $o = $rng\->ran_pascal($p, $n,10,10); \& $rng\->ran_pascal($p, $n,$o); .Ve .PP ran_pascal does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_pascal_var .IX Subsection "ran_pascal_var" .Vb 1 \& Signature: (p();n();[o]output(); IV rng) .Ve .PP Similar to "ran_pascal" 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 .PP ran_pascal_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_geometric .IX Subsection "ran_geometric" .Vb 1 \& Signature: ([o]output(); double p; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_geometric($p,10,10); \& $rng\->ran_geometric($p,$o); .Ve .PP ran_geometric does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_geometric_var .IX Subsection "ran_geometric_var" .Vb 1 \& Signature: (p();[o]output(); IV rng) .Ve .PP Similar to "ran_geometric" 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 .PP ran_geometric_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_hypergeometric .IX Subsection "ran_hypergeometric" .Vb 1 \& Signature: ([o]output(); double n1; double n2; double t; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_hypergeometric($n1, $n2, $t,10,10); \& $rng\->ran_hypergeometric($n1, $n2, $t,$o); .Ve .PP ran_hypergeometric does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_hypergeometric_var .IX Subsection "ran_hypergeometric_var" .Vb 1 \& Signature: (n1();n2();t();[o]output(); IV rng) .Ve .PP Similar to "ran_hypergeometric" 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 .PP ran_hypergeometric_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_logarithmic .IX Subsection "ran_logarithmic" .Vb 1 \& Signature: ([o]output(); double p; IV rng) .Ve .PP 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 .PP Example: .PP .Vb 2 \& $o = $rng\->ran_logarithmic($p,10,10); \& $rng\->ran_logarithmic($p,$o); .Ve .PP ran_logarithmic does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_logarithmic_var .IX Subsection "ran_logarithmic_var" .Vb 1 \& Signature: (p();[o]output(); IV rng) .Ve .PP Similar to "ran_logarithmic" 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 .PP ran_logarithmic_var does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_additive_gaussian .IX Subsection "ran_additive_gaussian" .Vb 1 \& Signature: ([o]x(); double sigma; IV rng) .Ve .PP 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 .PP ran_additive_gaussian does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_additive_poisson .IX Subsection "ran_additive_poisson" .Vb 1 \& Signature: ([o]x(); double sigma; IV rng) .Ve .PP 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 .PP ran_additive_poisson does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_feed_poisson .IX Subsection "ran_feed_poisson" .Vb 1 \& Signature: ([o]x(); IV rng) .Ve .PP This method simulates shot noise, taking the values of ndarray as values for \f(CW$mu\fR to be fed in the poissonian RNG. .PP Usage: .PP .Vb 1 \& $rng\->ran_feed_poisson($ndarray); .Ve .PP Example: .PP .Vb 1 \& $rng\->ran_feed_poisson($image); .Ve .PP ran_feed_poisson does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_bivariate_gaussian .IX Subsection "ran_bivariate_gaussian" .Vb 1 \& Signature: ([o]x(n); double sigma_x; double sigma_y; double rho; IV rng) .Ve .PP 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 .PP ran_bivariate_gaussian does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_discrete .IX Subsection "ran_discrete" .Vb 1 \& Signature: ([o]x(); IV rng_discrete; IV rng) .Ve .PP 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 .PP ran_discrete does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_ver .IX Subsection "ran_ver" .Vb 1 \& Signature: ([o]x(n); double x0; double r;int ns => n; IV rng) .Ve .PP 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 .PP ran_ver does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SS ran_caos .IX Subsection "ran_caos" .Vb 1 \& Signature: ([o]x(n); double m; int ns => n; IV rng) .Ve .PP 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 .PP ran_caos does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays. .SH BUGS .IX Header "BUGS" Feedback is welcome. Log bugs in the PDL bug database (the database is always linked from ). .SH "SEE ALSO" .IX Header "SEE ALSO" PDL .PP The GSL 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 COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file. .PP The GSL RNG and randist modules were written by James Theiler.