leto / math--gsl
- Source
- Commits
- Network (4)
- Issues (0)
- Downloads (8)
- Wiki (1)
- Graphs
-
Tree:
5dd4226
NAME
Math::GSL::Randist - Probability Distributions
SYNOPSIS
use Math::GSL::Randist qw/:all/;
DESCRIPTION
Here is a list of all the functions included in this module :
Gamma($a) Gamma($b)} $x**{$a-1} (1-$x)**{$b-1} dx for 0 <= $x <= 1.$r is a gsl_rng structure.exp(-$x/$mu) dx for $x >= 0. $r is a gsl_rng structure.exp(-|$x/$a|**$b) dx for $x >= 0. For $b = 1 this reduces to the Laplace distribution. For $b = 2 it has the same form as a gaussian distribution, but with $a = sqrt(2) sigma. $r is a gsl_rng structure.Gamma($nu/2) } (x/2)**{$nu/2 - 1} exp(-x/2) dx for $x >= 0. $r is a gsl_rng structure.Gamma($nu_1/2) Gamma($nu_2/2) } $nu_1**{$nu_1/2} $nu_2**{$nu_2/2} x**{$nu_1/2 - 1} ($nu_2 + $nu_1 x)**{-$nu_1/2 -$nu_2/2} for $x >= 0. $r is a gsl_rng structure.gsl_ran_ugaussian($r) - This function computes results for the unit Gaussian distribution. It is equivalent to the gaussian functions above with a standard deviation of one, sigma = 1. $r is a gsl_rng structure.gsl_ran_ugaussian_ratio_method($r) - This function computes results for the unit Gaussian distribution. It is equivalent to the gaussian functions above with a standard deviation of one, sigma = 1. $r is a gsl_rng structure.gsl_ran_ugaussian_pdf($x) - This function computes results for the unit Gaussian distribution. It is equivalent to the gaussian functions above with a standard deviation of one, sigma = 1.gsl_ran_landau($r) - This function returns a random variate from the Landau distribution. The probability distribution for Landau random variates is defined analytically by the complex integral, p(x) = (1/(2 \pi i)) \int_{c-i\infty}^{c+i\infty} ds exp(s log(s) + x s) For numerical purposes it is more convenient to use the following equivalent form of the integral, p(x) = (1/\pi) \int_0^\infty dt \exp(-t \log(t) - x t) \sin(\pi t). $r is a gsl_rng structure.gsl_ran_landau_pdf($x) - This function computes the probability density p($x) at $x for the Landau distribution using an approximation to the formula given above.exp(-$mu) for $k >= 0. $r is a gsl_rng structuresqrt(2) $c and the skewness parameter has no effect. For $alpha < 1 the tails of the distribution become extremely wide. The symmetric distribution corresponds to $beta = 0. The algorithm only works for 0 < $alpha <= 2. The Levy alpha-stable distributions have the property that if N alpha-stable variates are drawn from the distribution p(c, \alpha, \beta) then the sum Y = X_1 + X_2 + \dots + X_N will also be distributed as an alpha-stable variate, p(N^(1/\alpha) c, \alpha, \beta). $r is a gsl_rng structuregsl_ran_discrete_free($g) - De-allocates the gsl_ran_discrete pointed to by g.You have to add the functions you want to use inside the qw /put_funtion_here /. You can also write use Math::GSL::Randist qw/:all/; to use all avaible functions of the module. Other tags are also avaible, here is a complete list of all tags for this module :
For example the beta tag contains theses functions : gsl_ran_beta, gsl_ran_beta_pdf.
For more informations on the functions, we refer you to the GSL offcial documentation: http://www.gnu.org/software/gsl/manual/html_node/ Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want
You might also want to write use Math::GSL::RNG qw/:all/; since a lot of the functions of Math::GSL::Randist take as argument a structure that is created by Math::GSL::RNG. Refer to Math::GSL::RNG documentation to see how to create such a structure.
Math::GSL::CDF also contains a structure named gsl_ran_discrete_t. An example is given in the EXAMPLES part on how to use the function related to this structure.
EXAMPLES
use Math::GSL::Randist qw/:all/;
print gsl_ran_exponential_pdf(5,2) . "\n";
use Math::GSL::Randist qw/:all/;
$x= Math::GSL::gsl_ran_discrete_t::new;
AUTHORS
Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2008-2009 Jonathan Leto and Thierry Moisan
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

