STK++ 0.9.13
STK_Funct_gammaRatio.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright (C) 2004-2016 Serge Iovleff, Université Lille 1, Inria
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the
16 Free Software Foundation, Inc.,
17 59 Temple Place,
18 Suite 330,
19 Boston, MA 02111-1307
20 USA
21
22 Contact : S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
23*/
24
25/*
26 * Project: Analysis
27 * Purpose: Declaration of functions around the gamma function rqtio
28 * Author: Serge Iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
29 **/
30
36#ifndef STK_FUNCT_GAMMARATIO_H
37#define STK_FUNCT_GAMMARATIO_H
38
39#include <STKernel.h>
40
41namespace STK
42{
43
44namespace Funct
45{
46
47#ifdef IS_RTKPP_LIBRARY
48
49inline Real gammaRatio(Real const& a, Real const& x, bool lower_tail)
50{ return Rf_pgamma(x, a, 1., lower_tail, false);}
51
52#else
53
54Real gammaRatio_raw(Real const& a, Real const& x, bool lower_tail);
55
56inline Real gammaRatioQ_raw(Real const& a, Real const& x)
57{ return gammaRatio_raw(a, x, false);}
58
59inline Real gammaRatioP_raw(Real const& a, Real const& x)
60{ return gammaRatio_raw(a, x, true);}
61
62#endif
63
74Real gammaRatio(Real const& a, Real const& x, bool lower_tail);
75
85inline Real gammaRatioQ(Real const& a, Real const& x)
86{ return gammaRatio(a, x, false);}
87
97inline Real gammaRatioP(Real const& a, Real const& x)
98{ return gammaRatio(a, x, true);}
99
100} // namespace Funct
101
102} // namespace STK
103
104#endif /*STK_FUNCT_GAMMARATIO_H*/
This file include all the header files of the project STKernel.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
Real gammaRatio(Real const &a, Real const &x, bool lower_tail)
Compute the incomplete gamma functions ratio.
Real gammaRatioQ(Real const &a, Real const &x)
Compute the incomplete gamma function ratio Q(a,x).
Real gammaRatioP(Real const &a, Real const &x)
Compute the incomplete gamma function ratio P(a,x).
double Real
STK fundamental type of Real values.
Real gammaRatio_raw(Real const &a, Real const &x, bool lower_tail)
Real gammaRatioQ_raw(Real const &a, Real const &x)
Real gammaRatioP_raw(Real const &a, Real const &x)
The namespace STK is the main domain space of the Statistical ToolKit project.