Fiddle with Typemaps. Poly is happy, Sort is not.
[Math-GSL.git] / CDF.i
blob6f833bd14c94f889881f45724e6d4896e64de8af
1 %module CDF
2 %{
3 #include "/usr/local/include/gsl/gsl_cdf.h"
4 %}
6 %include "/usr/local/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
47 These functions compute the cumulative distribution functions P(x), Q(x) and their inverses for the named distributions.
49 =head1 SYPNOPSIS
51 use Math::GSL::CDF qw / put_functions_here/;
53 =head1 DESCRIPTION
55 Here is a list of all the functions included in this module :
56 gsl_cdf_ugaussian_P gsl_cdf_ugaussian_Q gsl_cdf_ugaussian_Pinv
57 gsl_cdf_ugaussian_Qinv gsl_cdf_gaussian_P gsl_cdf_gaussian_Q
58 gsl_cdf_gaussian_Pinv gsl_cdf_gaussian_Qinv gsl_cdf_gamma_P
59 gsl_cdf_gamma_Q gsl_cdf_gamma_Pinv gsl_cdf_gamma_Qinv
60 gsl_cdf_cauchy_P gsl_cdf_cauchy_Q gsl_cdf_cauchy_Pinv
61 gsl_cdf_cauchy_Qinv gsl_cdf_laplace_P gsl_cdf_laplace_Q
62 gsl_cdf_laplace_Pinv gsl_cdf_laplace_Qinv gsl_cdf_rayleigh_P
63 gsl_cdf_rayleigh_Q gsl_cdf_rayleigh_Pinv gsl_cdf_rayleigh_Qinv
64 gsl_cdf_chisq_P gsl_cdf_chisq_Q gsl_cdf_chisq_Pinv
65 gsl_cdf_chisq_Qinv gsl_cdf_exponential_P gsl_cdf_exponential_Q
66 gsl_cdf_exponential_Pinv gsl_cdf_exponential_Qinv gsl_cdf_exppow_P
67 gsl_cdf_exppow_Q gsl_cdf_tdist_P gsl_cdf_tdist_Q
68 gsl_cdf_tdist_Pinv gsl_cdf_tdist_Qinv gsl_cdf_fdist_P
69 gsl_cdf_fdist_Q gsl_cdf_fdist_Pinv gsl_cdf_fdist_Qinv
70 gsl_cdf_beta_P gsl_cdf_beta_Q gsl_cdf_beta_Pinv
71 gsl_cdf_beta_Qinv gsl_cdf_flat_P gsl_cdf_flat_Q
72 gsl_cdf_flat_Pinv gsl_cdf_flat_Qinv gsl_cdf_lognormal_P
73 gsl_cdf_lognormal_Q gsl_cdf_lognormal_Pinv gsl_cdf_lognormal_Qinv
74 gsl_cdf_gumbel1_P gsl_cdf_gumbel1_Q gsl_cdf_gumbel1_Pinv
75 gsl_cdf_gumbel1_Qinv gsl_cdf_gumbel2_P gsl_cdf_gumbel2_Q
76 gsl_cdf_gumbel2_Pinv gsl_cdf_gumbel2_Qinv gsl_cdf_weibull_P
77 gsl_cdf_weibull_Q gsl_cdf_weibull_Pinv gsl_cdf_weibull_Qinv
78 gsl_cdf_pareto_P gsl_cdf_pareto_Q gsl_cdf_pareto_Pinv
79 gsl_cdf_pareto_Qinv gsl_cdf_logistic_P gsl_cdf_logistic_Q
80 gsl_cdf_logistic_Pinv gsl_cdf_logistic_Qinv gsl_cdf_binomial_P
81 gsl_cdf_binomial_Q gsl_cdf_poisson_P gsl_cdf_poisson_Q
82 gsl_cdf_geometric_P gsl_cdf_geometric_Q gsl_cdf_negative_binomial_P
83 gsl_cdf_negative_binomial_Q gsl_cdf_pascal_P gsl_cdf_pascal_Q
84 gsl_cdf_hypergeometric_P gsl_cdf_hypergeometric_Q
86 You have to add the functions you want to use inside the qw /put_funtion_here /. You can also write use Math::GSL::PowInt qw/:name_of_tag/ to use all avaible functions of the module. Other tags are also avaible, here is a complete list of all tags for this module :
88 geometric
89 tdist
90 ugaussian
91 rayleigh
92 pascal
93 exponential
94 gumbel2
95 gumbel1
96 exppow
97 logistic
98 weibull
99 gaussian
100 poisson
101 beta
102 binomial
103 laplace
104 lognormal
105 cauchy
106 fdist
107 chisq
108 gamma
109 hypergeometric
110 negative
111 pareto
112 flat
114 For example the beta tag contains theses functions : gsl_cdf_beta_P, gsl_cdf_beta_Q, gsl_cdf_beta_Pinv, gsl_cdf_beta_Qinv.
116 For more informations on the functions, we refer you to the GSL offcial documentation: http://www.gnu.org/software/gsl/manual/html_node/
117 Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want
119 =head1 EXAMPLES
121 example using tag:
123 use Math::GSL::CDF qw /:beta/;
124 print gsl_cdf_beta_P(1,2,3) . "\n";
127 example using functions:
129 use Math::GSL::CDF qw /gsl_cdf_laplace_P gsl_cdf_laplace_Q/;
131 print gsl_cdf_laplace_P(2,3). "\n";
132 print gsl_cdf_laplace_Q(2,3). "\n";
134 =head1 AUTHOR
136 Jonathan Leto <jaleto@gmail.com> and Thierry Moisan <thierry.moisan@gmail.com>
138 =head1 COPYRIGHT AND LICENSE
140 Copyright (C) 2008 Jonathan Leto and Thierry Moisan
142 This program is free software; you can redistribute it and/or modify it
143 under the same terms as Perl itself.
145 =cut