Cleanup Deriv for merge.
[Math-GSL.git] / CDF.i
blob4076e2456f02626869ec9e707edb5fa3651de28e
1 %module "Math::GSL::CDF"
2 %{
3 #include "gsl/gsl_cdf.h"
4 %}
6 %include "gsl/gsl_cdf.h"
8 %perlcode %{
10 our @EXPORT_OK = qw/ gsl_cdf_ugaussian_P gsl_cdf_ugaussian_Q gsl_cdf_ugaussian_Pinv
11 gsl_cdf_ugaussian_Qinv gsl_cdf_gaussian_P gsl_cdf_gaussian_Q
12 gsl_cdf_gaussian_Pinv gsl_cdf_gaussian_Qinv gsl_cdf_gamma_P
13 gsl_cdf_gamma_Q gsl_cdf_gamma_Pinv gsl_cdf_gamma_Qinv
14 gsl_cdf_cauchy_P gsl_cdf_cauchy_Q gsl_cdf_cauchy_Pinv
15 gsl_cdf_cauchy_Qinv gsl_cdf_laplace_P gsl_cdf_laplace_Q
16 gsl_cdf_laplace_Pinv gsl_cdf_laplace_Qinv gsl_cdf_rayleigh_P
17 gsl_cdf_rayleigh_Q gsl_cdf_rayleigh_Pinv gsl_cdf_rayleigh_Qinv
18 gsl_cdf_chisq_P gsl_cdf_chisq_Q gsl_cdf_chisq_Pinv
19 gsl_cdf_chisq_Qinv gsl_cdf_exponential_P gsl_cdf_exponential_Q
20 gsl_cdf_exponential_Pinv gsl_cdf_exponential_Qinv gsl_cdf_exppow_P
21 gsl_cdf_exppow_Q gsl_cdf_tdist_P gsl_cdf_tdist_Q
22 gsl_cdf_tdist_Pinv gsl_cdf_tdist_Qinv gsl_cdf_fdist_P
23 gsl_cdf_fdist_Q gsl_cdf_fdist_Pinv gsl_cdf_fdist_Qinv
24 gsl_cdf_beta_P gsl_cdf_beta_Q gsl_cdf_beta_Pinv
25 gsl_cdf_beta_Qinv gsl_cdf_flat_P gsl_cdf_flat_Q
26 gsl_cdf_flat_Pinv gsl_cdf_flat_Qinv gsl_cdf_lognormal_P
27 gsl_cdf_lognormal_Q gsl_cdf_lognormal_Pinv gsl_cdf_lognormal_Qinv
28 gsl_cdf_gumbel1_P gsl_cdf_gumbel1_Q gsl_cdf_gumbel1_Pinv
29 gsl_cdf_gumbel1_Qinv gsl_cdf_gumbel2_P gsl_cdf_gumbel2_Q
30 gsl_cdf_gumbel2_Pinv gsl_cdf_gumbel2_Qinv gsl_cdf_weibull_P
31 gsl_cdf_weibull_Q gsl_cdf_weibull_Pinv gsl_cdf_weibull_Qinv
32 gsl_cdf_pareto_P gsl_cdf_pareto_Q gsl_cdf_pareto_Pinv
33 gsl_cdf_pareto_Qinv gsl_cdf_logistic_P gsl_cdf_logistic_Q
34 gsl_cdf_logistic_Pinv gsl_cdf_logistic_Qinv gsl_cdf_binomial_P
35 gsl_cdf_binomial_Q gsl_cdf_poisson_P gsl_cdf_poisson_Q
36 gsl_cdf_geometric_P gsl_cdf_geometric_Q gsl_cdf_negative_binomial_P
37 gsl_cdf_negative_binomial_Q gsl_cdf_pascal_P gsl_cdf_pascal_Q
38 gsl_cdf_hypergeometric_P gsl_cdf_hypergeometric_Q
40 our %EXPORT_TAGS = ( all => [ @EXPORT_OK ], geometric => [ gsl_cdf_geometric_P , gsl_cdf_geometric_Q ], tdist => [ gsl_cdf_tdist_P , gsl_cdf_tdist_Q , gsl_cdf_tdist_Pinv , gsl_cdf_tdist_Qinv ], ugaussian => [ gsl_cdf_ugaussian_P , gsl_cdf_ugaussian_Q , gsl_cdf_ugaussian_Pinv , gsl_cdf_ugaussian_Qinv ], rayleigh => [ gsl_cdf_rayleigh_P , gsl_cdf_rayleigh_Q , gsl_cdf_rayleigh_Pinv , gsl_cdf_rayleigh_Qinv ], pascal => [ gsl_cdf_pascal_P , gsl_cdf_pascal_Q ], exponential => [ gsl_cdf_exponential_P , gsl_cdf_exponential_Q , gsl_cdf_exponential_Pinv , gsl_cdf_exponential_Qinv ], gumbel2 => [ gsl_cdf_gumbel2_P , gsl_cdf_gumbel2_Q , gsl_cdf_gumbel2_Pinv , gsl_cdf_gumbel2_Qinv ], gumbel1 => [ gsl_cdf_gumbel1_P , gsl_cdf_gumbel1_Q , gsl_cdf_gumbel1_Pinv , gsl_cdf_gumbel1_Qinv ], exppow => [ gsl_cdf_exppow_P , gsl_cdf_exppow_Q ], logistic => [ gsl_cdf_logistic_P , gsl_cdf_logistic_Q , gsl_cdf_logistic_Pinv , gsl_cdf_logistic_Qinv ], weibull => [ gsl_cdf_weibull_P , gsl_cdf_weibull_Q , gsl_cdf_weibull_Pinv , gsl_cdf_weibull_Qinv ], gaussian => [ gsl_cdf_gaussian_P , gsl_cdf_gaussian_Q , gsl_cdf_gaussian_Pinv , gsl_cdf_gaussian_Qinv ], poisson => [ gsl_cdf_poisson_P , gsl_cdf_poisson_Q ], beta => [ gsl_cdf_beta_P , gsl_cdf_beta_Q , gsl_cdf_beta_Pinv , gsl_cdf_beta_Qinv ], binomial => [ gsl_cdf_binomial_P , gsl_cdf_binomial_Q ], laplace => [ gsl_cdf_laplace_P , gsl_cdf_laplace_Q , gsl_cdf_laplace_Pinv , gsl_cdf_laplace_Qinv ], lognormal => [ gsl_cdf_lognormal_P , gsl_cdf_lognormal_Q , gsl_cdf_lognormal_Pinv , gsl_cdf_lognormal_Qinv ], cauchy => [ gsl_cdf_cauchy_P , gsl_cdf_cauchy_Q , gsl_cdf_cauchy_Pinv , gsl_cdf_cauchy_Qinv ], fdist => [ gsl_cdf_fdist_P , gsl_cdf_fdist_Q , gsl_cdf_fdist_Pinv , gsl_cdf_fdist_Qinv ], chisq => [ gsl_cdf_chisq_P , gsl_cdf_chisq_Q , gsl_cdf_chisq_Pinv , gsl_cdf_chisq_Qinv ], gamma => [ gsl_cdf_gamma_P , gsl_cdf_gamma_Q , gsl_cdf_gamma_Pinv , gsl_cdf_gamma_Qinv ], hypergeometric => [ gsl_cdf_hypergeometric_P , gsl_cdf_hypergeometric_Q ], negative => [ gsl_cdf_negative_binomial_P , gsl_cdf_negative_binomial_Q ], pareto => [ gsl_cdf_pareto_P , gsl_cdf_pareto_Q , gsl_cdf_pareto_Pinv , gsl_cdf_pareto_Qinv ], flat => [ gsl_cdf_flat_P , gsl_cdf_flat_Q , gsl_cdf_flat_Pinv , gsl_cdf_flat_Qinv ]);
42 __END__
44 =head1 NAME
46 Math::GSL::CDF - Cumulative Distribution Functions
48 =head1 SYNOPSIS
50 use Math::GSL::CDF qw /:all/;
51 my $x = gsl_cdf_gaussian_Pinv($P, $sigma);
53 These functions compute the cumulative distribution functions P(x), Q(x) and
54 their inverses for the named distributions.
56 =head1 DESCRIPTION
58 Here is a list of all the functions included in this module :
60 gsl_cdf_ugaussian_P($x)
61 gsl_cdf_ugaussian_Q($x)
62 gsl_cdf_ugaussian_Pinv($P)
63 gsl_cdf_ugaussian_Qinv($Q)
64 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the unit Gaussian distribution.
66 gsl_cdf_gaussian_P($x, $sigma)
67 gsl_cdf_gaussian_Q($x, $sigma)
68 gsl_cdf_gaussian_Pinv($P, $sigma)
69 gsl_cdf_gaussian_Qinv($Q, $sigma)
70 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the Gaussian distribution with standard deviation $sigma.
72 gsl_cdf_gamma_P($x, $a, $b)
73 gsl_cdf_gamma_Q($x, $a, $b)
74 gsl_cdf_gamma_Pinv($P, $a, $b)
75 gsl_cdf_gamma_Qinv($Q, $a, $b)
76 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the gamma distribution with parameters $a and $b.
78 gsl_cdf_cauchy_P($x, $a)
79 gsl_cdf_cauchy_Q($x, $a)
80 gsl_cdf_cauchy_Pinv($P, $a)
81 gsl_cdf_cauchy_Qinv($Q, $a)
82 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the Cauchy distribution with scale parameter $a.
84 gsl_cdf_laplace_P($x, $a)
85 gsl_cdf_laplace_Q($x, $a)
86 gsl_cdf_laplace_Pinv($P, $a)
87 gsl_cdf_laplace_Qinv($Q, $a)
88 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the Laplace distribution with width $a.
90 gsl_cdf_rayleigh_P($x, $sigma)
91 gsl_cdf_rayleigh_Q($x, $sigma)
92 gsl_cdf_rayleigh_Pinv($P, $sigma)
93 gsl_cdf_rayleigh_Qinv($Q, $sigma)
94 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the Rayleigh distribution with scale parameter $sigma.
96 gsl_cdf_chisq_P($x, $nu)
97 gsl_cdf_chisq_Q($x, $nu)
98 gsl_cdf_chisq_Pinv($P, $nu)
99 gsl_cdf_chisq_Qinv($Q, $nu)
100 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the chi-squared distribution with $nu degrees of freedom.
102 gsl_cdf_exponential_P($x, $mu)
103 gsl_cdf_exponential_Q($x, $mu)
104 gsl_cdf_exponential_Pinv($P, $mu)
105 gsl_cdf_exponential_Qinv($Q, $mu)
106 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the Laplace distribution with width $a.
108 gsl_cdf_exppow_P($x, $a, $b)
109 gsl_cdf_exppow_Q($x, $a, $b)
110 - These functions compute the cumulative distribution functions P(x), Q(x) for the exponential power distribution with parameters $a and $b.
112 gsl_cdf_tdist_P($x, $nu)
113 gsl_cdf_tdist_Q($x, $nu)
114 gsl_cdf_tdist_Pinv($P, $nu)
115 gsl_cdf_tdist_Qinv($Q, $nu)
116 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the t-distribution with $nu degrees of freedom.
118 gsl_cdf_fdist_P($x, $nu1, $nu2)
119 gsl_cdf_fdist_Q($x, $nu1, $nu2)
120 gsl_cdf_fdist_Pinv($P, $nu1, $nu2)
121 gsl_cdf_fdist_Qinv($Q, $nu1, $nu2)
122 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the F-distribution with $nu1 and $nu2 degrees of freedom.
124 gsl_cdf_beta_P($x, $a, $b)
125 gsl_cdf_beta_Q($x, $a, $b)
126 gsl_cdf_beta_Pinv($P, $a, $b)
127 gsl_cdf_beta_Qinv($Q, $a, $b)
128 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the beta distribution with parameters $a and $b.
130 gsl_cdf_flat_P($x, $a, $b)
131 gsl_cdf_flat_Q($x, $a, $b)
132 gsl_cdf_flat_Pinv($P, $a, $b)
133 gsl_cdf_flat_Qinv($Q, $a, $b)
134 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for a uniform distribution from $a to $b.
136 gsl_cdf_lognormal_P($x, $zeta, $sigma)
137 gsl_cdf_lognormal_Q($x, $zeta, $sigma)
138 gsl_cdf_lognormal_Pinv($P, $zeta, $sigma)
139 gsl_cdf_lognormal_Qinv($Q, $zeta, $sigma)
140 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the lognormal distribution with parameters $zeta and $sigma.
142 gsl_cdf_gumbel1_P($x, $a, $b)
143 gsl_cdf_gumbel1_Q($x, $a, $b)
144 gsl_cdf_gumbel1_Pinv($P, $a, $b)
145 gsl_cdf_gumbel1_Qinv($Q, $a, $b)
146 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the Type-1 Gumbel distribution with parameters $a and $b.
148 gsl_cdf_gumbel2_P($x, $a, $b)
149 gsl_cdf_gumbel2_Q($x, $a, $b)
150 gsl_cdf_gumbel2_Pinv($P, $a, $b)
151 gsl_cdf_gumbel2_Qinv($Q, $a, $b)
152 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the Type-2 Gumbel distribution with parameters $a and $b.
154 gsl_cdf_weibull_P($x, $a, $b)
155 gsl_cdf_weibull_Q($x, $a, $b)
156 gsl_cdf_weibull_Pinv($P, $a, $b)
157 gsl_cdf_weibull_Qinv($Q, $a, $b)
158 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the Type-1 Gumbel distribution with parameters $a and $b.
160 gsl_cdf_pareto_P($x, $a, $b)
161 gsl_cdf_pareto_Q($x, $a, $b)
162 gsl_cdf_pareto_Pinv($P, $a, $b)
163 gsl_cdf_pareto_Qinv($Q, $a, $b)
164 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the Pareto distribution with exponent $a and scale $b.
166 gsl_cdf_logistic_P($x, $a)
167 gsl_cdf_logistic_Q($x, $a)
168 gsl_cdf_logistic_Pinv($P, $a)
169 gsl_cdf_logistic_Qinv($Q, $a)
170 - These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the logistic distribution with scale parameter a.
172 gsl_cdf_binomial_P($k, $p, $n)
173 gsl_cdf_binomial_Q($k, $p, $n)
174 - These functions compute the cumulative distribution functions P(k), Q(k) for the binomial distribution with parameters $p and $n.
176 gsl_cdf_poisson_P($k, $mu)
177 gsl_cdf_poisson_Q($k, $mu)
178 - These functions compute the cumulative distribution functions P(k), Q(k) for the Poisson distribution with parameter $mu.
180 gsl_cdf_geometric_P($k, $p)
181 gsl_cdf_geometric_Q($k, $p)
182 - These functions compute the cumulative distribution functions P(k), Q(k) for the geometric distribution with parameter $p.
184 gsl_cdf_negative_binomial_P($k, $p, $n)
185 gsl_cdf_negative_binomial_Q($k, $p, $n)
186 - These functions compute the cumulative distribution functions P(k), Q(k) for the negative binomial distribution with parameters $p and $n.
188 gsl_cdf_pascal_P($k, $p, $n)
189 gsl_cdf_pascal_Q($k, $p, $n)
190 - These functions compute the cumulative distribution functions P(k), Q(k) for the Pascal distribution with parameters $p and $n.
192 gsl_cdf_hypergeometric_P($k, $n1, $n2, $t)
193 gsl_cdf_hypergeometric_Q($k, $n1, $n2, $t)
194 - These functions compute the cumulative distribution functions P(k), Q(k) for the hypergeometric distribution with parameters $n1, $n2 and $t.
197 To import specific functions, list them in the use line. To import
198 all function exportable by Math::GSL::CDF do
200 use Math::GSL::CDF qw/:all/
202 This is the list of available import tags:
204 =over
206 =item geometric
208 =item tdist
210 =item ugaussian
212 =item rayleigh
214 =item pascal
216 =item exponential
218 =item gumbel2
220 =item gumbel1
222 =item exppow
224 =item logistic
226 =item weibull
228 =item gaussian
230 =item poisson
232 =item beta
234 =item binomial
236 =item laplace
238 =item lognormal
240 =item cauchy
242 =item fdist
244 =item chisq
246 =item gamma
248 =item hypergeometric
250 =item negative
252 =item pareto
254 =item flat
256 For example the beta tag contains theses functions : gsl_cdf_beta_P,
257 gsl_cdf_beta_Q, gsl_cdf_beta_Pinv, gsl_cdf_beta_Qinv.
259 For more informations on the functions, we refer you to the GSL offcial documentation:
260 L<http://www.gnu.org/software/gsl/manual/html_node/>
262 Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want
264 =back
266 =head1 EXAMPLES
268 Example using import tags:
270 use Math::GSL::CDF qw /:beta/;
271 print gsl_cdf_beta_P(1,2,3) . "\n";
273 =head1 AUTHORS
275 Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
277 =head1 COPYRIGHT AND LICENSE
279 Copyright (C) 2008 Jonathan Leto and Thierry Moisan
281 This program is free software; you can redistribute it and/or modify it
282 under the same terms as Perl itself.
284 =cut