-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyDistribution.h
More file actions
executable file
·57 lines (44 loc) · 1.26 KB
/
MyDistribution.h
File metadata and controls
executable file
·57 lines (44 loc) · 1.26 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef _MyDistribution_
#define _MyDistribution_
#include <vector>
#include <Distribution.h>
// inherit from Distribution to get hyperparameter change and drag moves for free
class MyDistribution:public Distribution
{
private:
// Limits
double l_min, l_max, b_min, b_max;
bool radec; // sets whether cos(b) factor is used
double fluxlo;
double fluxhi_min;
double flux_norm, norm_min, norm_max;
double penalty;
double slope;
// Lower limit and 1/slope for Pareto interim prior
// for masses
double fluxhi, norm;
double gamma;
int nbin;
int midbin;
double sdev_color_scale;
std::vector< double > mean_colors;
std::vector< double > sdev_colors;
double perturb_parameters();
public:
MyDistribution(double l_min, double l_max,
double b_min, double b_max, bool radec,
double fluxlo,
double fluxhi_min,
double flux_norm,
double norm_min, double norm_max,
double penalty, double slope,
int nbin, int midbin);
void fromPrior();
double log_pn(const int n) const;
double log_pdf(const std::vector<double>& vec) const;
void from_uniform(std::vector<double>& vec) const;
void to_uniform(std::vector<double>& vec) const;
void print(std::ostream& out) const;
std::string description() const;
};
#endif