// @(#)root/mathmore:$Id$
// Authors: L. Moneta, A. Zsenei   08/2005

/**********************************************************************
*                                                                    *
* Copyright (c) 2004 ROOT Foundation,  CERN/PH-SFT                   *
*                                                                    *
* This library is free software; you can redistribute it and/or      *
* modify it under the terms of the GNU General Public License        *
* as published by the Free Software Foundation; either version 2     *
* of the License, or (at your option) any later version.             *
*                                                                    *
* This library is distributed in the hope that it will be useful,    *
* but WITHOUT ANY WARRANTY; without even the implied warranty of     *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
* General Public License for more details.                           *
*                                                                    *
* You should have received a copy of the GNU General Public License  *
* along with this library (see file COPYING); if not, write          *
* to the Free Software Foundation, Inc., 59 Temple Place, Suite      *
* 330, Boston, MA 02111-1307 USA, or contact the author.             *
*                                                                    *
**********************************************************************/

#if defined(__CINT__) && !defined(__MAKECINT__)
// avoid to include header file when using CINT
#ifndef _WIN32
#include "../lib/libMathMore.so"
#else
#include "../bin/libMathMore.dll"
#endif

#else

#ifndef ROOT_Math_QuantFuncMathMore
#define ROOT_Math_QuantFuncMathMore

namespace ROOT {
namespace Math {

/** @defgroup QuantFunc Quantile Functions
*  @ingroup StatFunc
*
*  Inverse functions of the cumulative distribution functions
*  and the inverse of the complement of the cumulative distribution functions
*  for various distributions.
*  The functions with the extension <em>_quantile</em> calculate the
*  inverse of the <em>_cdf</em> function, the
*  lower tail integral of the probability density function
*  \f$D^{-1}(z)\f$ where
*
*  \f[ D(x) = \int_{-\infty}^{x} p(x') dx' \f]
*
*  while those with the <em>_quantile_c</em> extension calculate the
*  inverse of the <em>_cdf_c</em> functions, the upper tail integral of the probability
*  density function \f$D^{-1}(z) \f$ where
*
*  \f[ D(x) = \int_{x}^{+\infty} p(x') dx' \f]
*
* The implementation used is that of
* <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Distributions.html">GSL</A>.
*
* <strong>NOTE:</strong> In the old releases (< 5.14) the <em>_quantile</em> functions were called
* <em>_quant_inv</em> and the <em>_quantile_c</em> functions were called
* <em>_prob_inv</em>.
* These names are currently kept for backward compatibility, but
* their usage is deprecated.
*/

/** @name Quantile Functions from MathMore
* The implementation used is that of
* <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Distributions.html">GSL</A>.
*/

//@{

/**

Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
function of the upper tail of Student's t-distribution
(#tdistribution_cdf_c). For detailed description see
<A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
Mathworld</A>. The implementation used is that of
<A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC305">GSL</A>.

@ingroup QuantFunc

*/

double tdistribution_quantile_c(double z, double r);

/**

Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
function of the lower tail of Student's t-distribution
(#tdistribution_cdf). For detailed description see
<A HREF="http://mathworld.wolfram.com/Studentst-Distribution.html">
Mathworld</A>. The implementation used is that of
<A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC305">GSL</A>.

@ingroup QuantFunc

*/

double tdistribution_quantile(double z, double r);

#ifdef HAVE_OLD_STAT_FUNC

//@}
/** @name Backward compatible functions */

}
inline double chisquared_quant_inv(double x, double r) {
return chisquared_quantile  (x, r );
}

inline double gamma_quant_inv(double x, double alpha, double theta) {
return gamma_quantile   (x, alpha, theta );
}

inline double tdistribution_prob_inv(double x, double r) {
return tdistribution_quantile_c  (x, r );
}

inline double tdistribution_quant_inv(double x, double r) {
return tdistribution_quantile    (x, r );
}

#endif

} // namespace Math

namespace MathMore {

/**

Re-implementation in MathMore of the Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
function of the lower tail of the \f$\chi^2\f$ distribution
with \f$r\f$ degrees of freedom (#chisquared_cdf). For detailed description see
<A HREF="http://mathworld.wolfram.com/Chi-SquaredDistribution.html">
Mathworld</A>. The implementation used is that of
<A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC303">GSL</A>.

@ingroup QuantFunc

*/

double chisquared_quantile(double z, double r);

/**

Re-implementation in MathMore of the Inverse (\f$D^{-1}(z)\f$) of the cumulative distribution
function of the lower tail of the gamma distribution
(#gamma_cdf). For detailed description see
Mathworld</A>. The implementation used is that of
<A HREF="http://www.gnu.org/software/gsl/manual/gsl-ref_19.html#SEC300">GSL</A>.

@ingroup QuantFunc

*/

double gamma_quantile(double z, double alpha, double theta);

} // end namespace MathMore
} // namespace ROOT

#endif // ROOT_Math_QuantFuncMathMore

#endif // if defined (__CINT__) && !defined(__MAKECINT__)

QuantFuncMathMore.h:1
QuantFuncMathMore.h:2
QuantFuncMathMore.h:3
QuantFuncMathMore.h:4
QuantFuncMathMore.h:5
QuantFuncMathMore.h:6
QuantFuncMathMore.h:7
QuantFuncMathMore.h:8
QuantFuncMathMore.h:9
QuantFuncMathMore.h:10
QuantFuncMathMore.h:11
QuantFuncMathMore.h:12
QuantFuncMathMore.h:13
QuantFuncMathMore.h:14
QuantFuncMathMore.h:15
QuantFuncMathMore.h:16
QuantFuncMathMore.h:17
QuantFuncMathMore.h:18
QuantFuncMathMore.h:19
QuantFuncMathMore.h:20
QuantFuncMathMore.h:21
QuantFuncMathMore.h:22
QuantFuncMathMore.h:23
QuantFuncMathMore.h:24
QuantFuncMathMore.h:25
QuantFuncMathMore.h:26
QuantFuncMathMore.h:27
QuantFuncMathMore.h:28
QuantFuncMathMore.h:29
QuantFuncMathMore.h:30
QuantFuncMathMore.h:31
QuantFuncMathMore.h:32
QuantFuncMathMore.h:33
QuantFuncMathMore.h:34
QuantFuncMathMore.h:35
QuantFuncMathMore.h:36
QuantFuncMathMore.h:37
QuantFuncMathMore.h:38
QuantFuncMathMore.h:39
QuantFuncMathMore.h:40
QuantFuncMathMore.h:41
QuantFuncMathMore.h:42
QuantFuncMathMore.h:43
QuantFuncMathMore.h:44
QuantFuncMathMore.h:45
QuantFuncMathMore.h:46
QuantFuncMathMore.h:47
QuantFuncMathMore.h:48
QuantFuncMathMore.h:49
QuantFuncMathMore.h:50
QuantFuncMathMore.h:51
QuantFuncMathMore.h:52
QuantFuncMathMore.h:53
QuantFuncMathMore.h:54
QuantFuncMathMore.h:55
QuantFuncMathMore.h:56
QuantFuncMathMore.h:57
QuantFuncMathMore.h:58
QuantFuncMathMore.h:59
QuantFuncMathMore.h:60
QuantFuncMathMore.h:61
QuantFuncMathMore.h:62
QuantFuncMathMore.h:63
QuantFuncMathMore.h:64
QuantFuncMathMore.h:65
QuantFuncMathMore.h:66
QuantFuncMathMore.h:67
QuantFuncMathMore.h:68
QuantFuncMathMore.h:69
QuantFuncMathMore.h:70
QuantFuncMathMore.h:71
QuantFuncMathMore.h:72
QuantFuncMathMore.h:73
QuantFuncMathMore.h:74
QuantFuncMathMore.h:75
QuantFuncMathMore.h:76
QuantFuncMathMore.h:77
QuantFuncMathMore.h:78
QuantFuncMathMore.h:79
QuantFuncMathMore.h:80
QuantFuncMathMore.h:81
QuantFuncMathMore.h:82
QuantFuncMathMore.h:83
QuantFuncMathMore.h:84
QuantFuncMathMore.h:85
QuantFuncMathMore.h:86
QuantFuncMathMore.h:87
QuantFuncMathMore.h:88
QuantFuncMathMore.h:89
QuantFuncMathMore.h:90
QuantFuncMathMore.h:91
QuantFuncMathMore.h:92
QuantFuncMathMore.h:93
QuantFuncMathMore.h:94
QuantFuncMathMore.h:95
QuantFuncMathMore.h:96
QuantFuncMathMore.h:97
QuantFuncMathMore.h:98
QuantFuncMathMore.h:99
QuantFuncMathMore.h:100
QuantFuncMathMore.h:101
QuantFuncMathMore.h:102
QuantFuncMathMore.h:103
QuantFuncMathMore.h:104
QuantFuncMathMore.h:105
QuantFuncMathMore.h:106
QuantFuncMathMore.h:107
QuantFuncMathMore.h:108
QuantFuncMathMore.h:109
QuantFuncMathMore.h:110
QuantFuncMathMore.h:111
QuantFuncMathMore.h:112
QuantFuncMathMore.h:113
QuantFuncMathMore.h:114
QuantFuncMathMore.h:115
QuantFuncMathMore.h:116
QuantFuncMathMore.h:117
QuantFuncMathMore.h:118
QuantFuncMathMore.h:119
QuantFuncMathMore.h:120
QuantFuncMathMore.h:121
QuantFuncMathMore.h:122
QuantFuncMathMore.h:123
QuantFuncMathMore.h:124
QuantFuncMathMore.h:125
QuantFuncMathMore.h:126
QuantFuncMathMore.h:127
QuantFuncMathMore.h:128
QuantFuncMathMore.h:129
QuantFuncMathMore.h:130
QuantFuncMathMore.h:131
QuantFuncMathMore.h:132
QuantFuncMathMore.h:133
QuantFuncMathMore.h:134
QuantFuncMathMore.h:135
QuantFuncMathMore.h:136
QuantFuncMathMore.h:137
QuantFuncMathMore.h:138
QuantFuncMathMore.h:139
QuantFuncMathMore.h:140
QuantFuncMathMore.h:141
QuantFuncMathMore.h:142
QuantFuncMathMore.h:143
QuantFuncMathMore.h:144
QuantFuncMathMore.h:145
QuantFuncMathMore.h:146
QuantFuncMathMore.h:147
QuantFuncMathMore.h:148
QuantFuncMathMore.h:149
QuantFuncMathMore.h:150
QuantFuncMathMore.h:151
QuantFuncMathMore.h:152
QuantFuncMathMore.h:153
QuantFuncMathMore.h:154
QuantFuncMathMore.h:155
QuantFuncMathMore.h:156
QuantFuncMathMore.h:157
QuantFuncMathMore.h:158
QuantFuncMathMore.h:159
QuantFuncMathMore.h:160
QuantFuncMathMore.h:161
QuantFuncMathMore.h:162
QuantFuncMathMore.h:163
QuantFuncMathMore.h:164
QuantFuncMathMore.h:165
QuantFuncMathMore.h:166
QuantFuncMathMore.h:167
QuantFuncMathMore.h:168
QuantFuncMathMore.h:169
QuantFuncMathMore.h:170
QuantFuncMathMore.h:171
QuantFuncMathMore.h:172
QuantFuncMathMore.h:173
QuantFuncMathMore.h:174
QuantFuncMathMore.h:175
QuantFuncMathMore.h:176
QuantFuncMathMore.h:177
QuantFuncMathMore.h:178
QuantFuncMathMore.h:179
QuantFuncMathMore.h:180
QuantFuncMathMore.h:181
QuantFuncMathMore.h:182
QuantFuncMathMore.h:183
QuantFuncMathMore.h:184
QuantFuncMathMore.h:185
QuantFuncMathMore.h:186
QuantFuncMathMore.h:187
QuantFuncMathMore.h:188
QuantFuncMathMore.h:189
QuantFuncMathMore.h:190
QuantFuncMathMore.h:191
QuantFuncMathMore.h:192
QuantFuncMathMore.h:193
QuantFuncMathMore.h:194