[082b02]: src / modules / bugs / functions / ICLogLog.cc Maximize Restore History

Download this file

ICLogLog.cc    32 lines (24 with data), 494 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <config.h>
#include "ICLogLog.h"
#include <cmath>
using std::vector;
using std::log;
using std::exp;
namespace jags {
namespace bugs {
ICLogLog::ICLogLog(): LinkFunction("icloglog", "cloglog")
{
}
double ICLogLog::inverseLink(double eta) const
{
return 1 - exp(-exp(eta));
}
double ICLogLog::link(double mu) const
{
return log (-log (1 - mu));
}
double ICLogLog::grad(double eta) const
{
return exp(eta) * exp(-exp(eta));
}
}}