-
Notifications
You must be signed in to change notification settings - Fork 0
/
population.hpp
45 lines (35 loc) · 999 Bytes
/
population.hpp
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
#ifndef POPULATION_HPP
#define POPULATION_HPP
#include <string>
#include <vector>
struct State {
double S; // suscettibili
double E; // esposti
double I; // infetti
double R; // guariti
double D; // morti
};
class Population {
double b; // transmission rate
double g; // inverso del periodo medio di infezione
double s; // inverso del tempo di incubazione
double m; // mortality rate
double N; // popolazione
double T; // tempo di test in giorni
public:
Population(double beta, double gamma, double sigma, double mu, double n,
double time) {
b = beta;
g = gamma;
s = sigma;
m = mu;
N = n;
T = time;
}
void approximation(State& initial_state, double number);
void next(State& initial_state);
std::vector<State> evolve(State& initial_state);
int peak(std::vector<State> const& dati);
void print(std::vector<State> const& solution);
};
#endif // POPULATION_HPP