Statistics
| Revision:

root / branches / pthreads-737 / contrib / statslib / dinvgamma.cpp @ 765

History | View | Annotate | Download (383 Bytes)

1
#include "statsLib.h"
2

    
3
/**
4
* @file dinvgamma.cpp
5
* @brief Inverse gamma distribution
6
* 
7
* This file contains the inverse gamma distribution functions
8
* \ingroup STATLIB
9
* @author Chris Grandin, Steve Martell
10
* 
11
* @date 12/2/2011
12
* @remarks
13
**/
14

    
15
//inverse-gamma
16
dvariable dinvgamma(const dvariable& x, const double a, const double b)
17
{
18
        return -a*log(b)+gammln(a)+(a+1)*log(x)+b/x;
19
}