-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsimulation.h
More file actions
59 lines (44 loc) · 1.09 KB
/
simulation.h
File metadata and controls
59 lines (44 loc) · 1.09 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
#ifndef SIMULATION_H
#define SIMULATION_H
#include <stdlib.h>
#include <string>
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <assert.h>
#include <vector>
#include <set>
#include <map>
#include <fstream>
#include <climits>
#include <bitset>
#include <time.h>
#include <inttypes.h>
#include <iomanip> // std::setprecision
#include "operator.h"
#include "lattice.h"
using namespace std;
struct Distance_and_ID
{
float** Distance_Array;
int number_of_IDs;
};
class Simulation
{
public:
vector<int> XSize;
int iterations;
double pMin, pMax, pStep, q_sqr_factor, q_oct_factor;
Simulation (void);
~Simulation (void) { }
void run (void);
struct Distance_and_ID Distance(int newXSize, int newT, double p_err, double q_SQR_err, double q_OCT_err);
//for the error in time
//is not really used in the final simulation
//(only printed to screen)
double faculty (double n);
double ncr (double n, double k);
double determine_p_per_step (double p_G, int T_in);
double determine_p_effective (double p_G, int T_in);
};
#endif