File: ICLogLog.cc

package info (click to toggle)
jags 3.2.0-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 10,000 kB
  • sloc: ansic: 39,491; cpp: 26,212; sh: 10,540; yacc: 1,603; fortran: 773; makefile: 688; lex: 357
file content (31 lines) | stat: -rw-r--r-- 477 bytes parent folder | download | duplicates (3)
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 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));
    }

}