-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmcmc.h
More file actions
65 lines (50 loc) · 1.14 KB
/
mcmc.h
File metadata and controls
65 lines (50 loc) · 1.14 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
57
58
59
60
61
62
63
64
65
/*
* mcmc.h
* Selection_Recombination
*
* Created by Joshua Schraiber on 5/2/13.
* Copyright 2013 UC Berkeley. All rights reserved.
*
*/
#pragma once
#include <fstream>
#include <vector>
class wfSamplePath;
class measure;
class wienerMeasure;
class MbRandom;
class settings;
class param;
class sample_time;
class mcmc {
public:
mcmc(settings& mySettings, MbRandom* r);
private:
//variables to store
double curlnL;
double oldlnL;
std::vector<param*> pars;
wfSamplePath* curPath;
MbRandom* random;
int num_gen;
int printFreq;
int sampleFreq;
int minUpdate;
void no_linked_sites(settings& mySettings);
void linked_sites(settings& mySettings);
//for computing things
double compute_lnL(wfSamplePath* p, measure* m, wienerMeasure* wm);
double compute_lnL_sample_only(wfSamplePath* p);
double ascertain(wfSamplePath* p);
int gen;
int curProp;
//output files
std::ofstream paramFile;
std::ofstream trajFile;
std::ofstream timeFile;
//output functions
void prepareOutput(bool infer_age, std::vector<int> time_idx);
void printState();
bool doAscertain;
int minCount;
};