Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
GSL.hh
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2003-2009 (see file CONTACT for details)
5  Multimediale Systeme der Informationsverarbeitung
6  Institut fuer Informatik
7  Christian-Albrechts-Universitaet Kiel
8 
9 
10 BIAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 BIAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with BIAS; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 #ifndef __GSL_hh__
26 #define __GSL_hh__
27 
28 #include <bias_config.h>
29 
30 
31 namespace BIAS {
32 
33 #ifndef BIAS_HAVE_GSL
34 # error recompile BIAS with gsl support enabled
35 #endif
36 
37  /** @addtogroup g_mathalgo
38  @brief Computes the probability density at x of a chi square distribution
39  with deg_freedom degrees of freedom
40  C++ Wrappers for gnu scientific library (GSL)
41  @author woelk 07/2008 (c) www.vision-n.de */
42  BIASMathAlgo_EXPORT
43  double ChiSquareProbDensFun(double x, int deg_freedom);
44 
45  /** @addtogroup g_mathalgo
46  @brief Computes the culmulative probability at x of a chi square
47  distribution with deg_freedom degrees of freedom
48  C++ Wrappers for gnu scientific library (GSL)
49  @author woelk 02/2006 */
50  BIASMathAlgo_EXPORT
51  double ChiSquareCulmProbFun(double x, int deg_freedom);
52 
53  /** @addtogroup g_mathalgo
54  @brief Computes the inverse culmulative probability at x of a chi square
55  distribution with deg_freedom degrees of freedom
56  C++ Wrappers for gnu scientific library (GSL)
57  @author woelk 02/2006 */
58  BIASMathAlgo_EXPORT
59  double InvChiSquareCulmProbFun(double x, int deg_freedom);
60 
61  /** @addtogroup g_mathalgo
62  @brief C++ Wrappers for gnu scientific library (GSL)
63  \Gamma(x) = \int_0^\infty dt t^{x-1} \exp(-t)
64  The gamma function, x cannot be greater than 171.0 and x cannot be
65  a negative integer
66  @author woelk 02/2006 */
67  BIASMathAlgo_EXPORT
68  double Gamma(double x);
69 
70  /** @addtogroup g_mathalgo
71  @brief C++ Wrappers for gnu scientific library (GSL)
72  1/Gamma(x)
73  @author woelk 02/2006 */
74  BIASMathAlgo_EXPORT
75  double InvGamma(double x);
76 
77  /** @addtogroup g_mathalgo
78  @brief C++ Wrappers for gnu scientific library (GSL)
79  p(x) dx = {\Gamma(a+b) \over \Gamma(a) \Gamma(b)} x^{a-1} (1-x)^{b-1} dx
80  for 0 <= x <= 1.
81  For numerical reasons, a+b must be less than GSL_SF_GAMMA_XMAX (171.0)
82  @author woelk 02/2006 */
83  BIASMathAlgo_EXPORT
84  double BetaDistribution(double a, double b, double x);
85 
86 
87  /** @addtogroup g_mathalgo
88  @brief culultaive beta distribution
89  @author woelk 09/2006 */
90  BIASMathAlgo_EXPORT
91  double CulmBetaDistribution(double a, double b, double x);
92 
93 
94  /** @addtogroup g_mathalgo
95  @brief C++ Wrappers for gnu scientific library (GSL)
96  p(x) dx = {\Gamma(a+b) \over \Gamma(a) \Gamma(b)} x^{a-1} (1-x)^{b-1} dx
97  for 0 <= x <= 1.
98  For numerical reasons, a+b must be less equal GSL_SF_GAMMA_XMAX (171.0),
99  however when a==b the gamma distribution is approximated by a
100  gaussian distribution.
101  When a equals b, the beta distribution is symmetric about x=0.5.
102  It is approximated by a gaussian distribution for very large a and b
103 
104  @author woelk 02/2006 */
105  BIASMathAlgo_EXPORT
106  double BetaDistributionApprox(double a, double b, double x);
107 
108 
109  /** @brief culmulative probability function of normal distribution
110  @author woelk 09/2006 */
111  BIASMathAlgo_EXPORT
112  double CulmulativeNormalDistribution(double x, double sigma);
113 
114 
115 } // namespace
116 #endif // __GSL_hh__
BIASMathAlgo_EXPORT double BetaDistribution(double a, double b, double x)
Definition: GSL.cpp:123
BIASMathAlgo_EXPORT double ChiSquareProbDensFun(double x, int deg_freedom)
Definition: GSL.cpp:48
BIASMathAlgo_EXPORT double CulmulativeNormalDistribution(double x, double sigma)
culmulative probability function of normal distribution
Definition: GSL.cpp:163
BIASMathAlgo_EXPORT double InvChiSquareCulmProbFun(double x, int deg_freedom)
Definition: GSL.cpp:81
BIASMathAlgo_EXPORT double Gamma(double x)
Definition: GSL.cpp:95
BIASMathAlgo_EXPORT double InvGamma(double x)
Definition: GSL.cpp:109
BIASMathAlgo_EXPORT double CulmBetaDistribution(double a, double b, double x)
Definition: GSL.cpp:142
BIASMathAlgo_EXPORT double ChiSquareCulmProbFun(double x, int deg_freedom)
Definition: GSL.cpp:67
BIASMathAlgo_EXPORT double BetaDistributionApprox(double a, double b, double x)
Definition: GSL.cpp:184