GLAMERDOC++
Gravitational Lensing Code Library
Loading...
Searching...
No Matches
nestedsampler.h
1
2/*
3 * nestedsampler.h
4 *
5 * Created on: Mar 7, 2012
6 * Author: bmetcalf
7 */
8#ifndef NSEMAPLER_
9#define NSEMAPLER_
10
11class Sample{
12 double *params;
13 double lnL; // log likelihood
14 double lnW; // log of weights some of which is the evidence
15};
16
17class NestedSampler{
18public:
19 NestedSampler(double (*lnlikelihood)(double *),double (*lnprior)(double *),void (*stepper)(double *),int Nparams);
20 ~NestedSampler();
21
22 void explore(int Nsamples);
23 void PrintResults();
24
25 // output
26 double getEvidence();
27 double getInformation();
28 double getSample(std::vector<Sample> sample);
29 double getBestFit(double *param);
30
31private:
32
33 double Z;
34 double H;
35
36 int Nparameters; // Number of parameters, dimension of parameter space
37 double (*lnlikelihood)(double *params); //
38 double (*lnprior)(double *params);
39 void (*stepper)(double *params);
40
41};
42
43#endif