GLAMERDOC++
Gravitational Lensing Code Library
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
w
Functions
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
x
z
~
Variables
a
b
c
d
f
g
h
i
k
l
m
n
o
p
q
r
s
u
w
x
y
z
Related Symbols
Files
File List
File Members
All
Functions
Enumerations
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Friends
Modules
Pages
Loading...
Searching...
No Matches
SLsimLib
include
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
11
class
Sample{
12
double
*params;
13
double
lnL;
// log likelihood
14
double
lnW;
// log of weights some of which is the evidence
15
};
16
17
class
NestedSampler{
18
public
:
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
31
private
:
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
Generated on Fri Apr 18 2025 13:05:56 for GLAMERDOC++ by
1.13.2