root / branches / pthreads737 / contrib / statslib / eplogis.cpp @ 765
History  View  Annotate  Download (760 Bytes)
1 
#include "statsLib.h" 

2  
3 
/**

4 
* @file eplogis.cpp

5 
* @brief // Exponential logistic

6 
*

7 
* \ingroup STATLIB

8 
* @author Chris Grandin, Steve Martell

9 
*

10 
* @date 12/13/2011

11 
* @remarks

12 
*/

13  
14 
dvar_vector eplogis(const dvar_vector& x, const dvariable& alpha, const dvariable& beta, const dvariable& gamma) 
15 
{ 
16 
//exponential logistic based on Grant Thompson (1994) Paper, CJFAS.

17 
return (1./(1.gamma))*pow((1.gamma)/gamma,gamma)*elem_div(exp(alpha*gamma*(betax)),1.+exp(alpha*(betax))); 
18 
} 
19  
20 
dvector eplogis(const dvector& x, const double& alpha, const double& beta, const double& gamma) 
21 
{ 
22 
//exponential logistic based on Grant Thompson (1994) Paper, CJFAS.

23 
return (1./(1.gamma))*pow((1.gamma)/gamma,gamma)*elem_div(exp(alpha*gamma*(betax)),1.+exp(alpha*(betax))); 
24 
} 
25  
26 