-
Notifications
You must be signed in to change notification settings - Fork 0
/
DMC_old.h
101 lines (75 loc) · 1.6 KB
/
DMC_old.h
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
* File: DMC.h
* Author: jorgehog
*
* Created on 16. februar 2012, 16:18
*/
#ifndef DMC_H
#define DMC_H
#include "Walker.h"
#include "lib.h"
#include "System.h"
class Walker;
class System;
class DMC {
protected:
int n_c;
int n_w;
int dim;
int n_p;
int K; //how many times the walkers multiply their population;
int step;
bool importance;
double D;
double std;
double dt;
double E_T; //Trial energy
double E;
double GB;
public:
int n_w_now;
int n_w_orig;
long ranseed;
Walker **Angry_mob;
Walker *current_walker;
System* system;
int* population;
DMC();
~DMC();
virtual void do_DMC() = 0;
void increase_walker_space();
void calc_gs_statistics();
void bury_the_dead();
void Evolve_walker(int k);
void copy_walker(int parent, int child);
bool singular(int k);
virtual void update_pos(int k) = 0;
int get_dim() const;
int get_N_P() const;
virtual bool is_importance() const = 0;
virtual void initialize_walkers();
virtual double get_new_pos() = 0;
};
//////////////
//BRUTE FORCE
/////////////
class DMC_BF : public DMC {
protected:
double **tmp_r;
public:
DMC_BF();
~DMC_BF();
DMC_BF(double D, long randseed, int N_C, int N_W, System* system, double dt, double E_T);
virtual void do_DMC();
virtual bool is_importance() const;
virtual void update_pos(int k);
virtual double get_new_pos();
};
//////////////
//IMPORTANCE SAMPLING
/////////////
class DMC_Importance : public DMC{
public:
DMC_Importance();
};
#endif /* DMC_H */