Repository navigation
Expand file tree
/
Copy pathPoissonTauLeap.h
More file actions
41 lines (31 loc) · 2.32 KB
/
Copy pathPoissonTauLeap.h
File metadata and controls
41 lines (31 loc) · 2.32 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
//
// Created by Malysheva, Nadezhda on 13.07.20.
//
#ifndef ALGO_POISSONTAULEAP_H
#define ALGO_POISSONTAULEAP_H
#include "ContactNetwork.h"
void PoissonTauleap(double &tLastNetworkUpdate, double tEnd, ContactNetwork & contNetwork, double epsilon,
std::vector<double> &timeSteps, std::vector<std::vector<size_t>> °reeDistr,
bool updateDegreeDistr, std::mt19937_64 &generator/*, std::vector<BenStructure> &benToFile*/);
void selectTimeStepAndK(double &tau, const std::unordered_map<std::string, double> &propensities, const std::vector<int> &k,
size_t &kDel, size_t &kAdd, double tau1, double tau2, double aCrit, std::mt19937_64 &generator);
double proposeTau1(size_t lDel, size_t lAdd, size_t nAdd, double epsilon, std::vector<double> mu, std::vector<double> sigmaSq);
double proposeTau2(double aCrit, std::mt19937_64 &generator);
void executeSSA(size_t n, double tEnd, ContactNetwork & contNetwork, double &t,
double &tLastNetworkUpdate, std::vector<double> &timeSteps, std::vector<std::vector<size_t>> °reeDistr,
bool updateDegreeDistr, std::mt19937_64 &generator);
void updateDegreeDistribution(bool updateDegreeDistr, double t, std::vector<double> &timeSteps,
std::vector<std::vector<size_t>> °reeDistr, /*const*/ ContactNetwork &contNetwork);
int splitRandomNumber(int kDel, int kAdd, int &N, std::mt19937_64 &generator);
void updateNetwork(std::vector<BenStructure> &benToFile, std::vector<int> k, int nDel, std::mt19937_64 &generator,
std::vector<std::pair<double, lemon::ListGraph::Edge>> &propAdd,
std::vector<std::pair<double, lemon::ListGraph::Edge>> &propDel, double t,
ContactNetwork & contNetwork,
std::unordered_map<std::string, double> &propensities);
void updateNetwork2(std::vector<BenStructure> &benToFile, std::vector<int> k, int nDel, std::mt19937_64 &generator,
std::vector<std::pair<double, lemon::ListGraph::Edge>> &propAdd,
std::vector<std::pair<double, lemon::ListGraph::Edge>> &propDel, double t,
ContactNetwork & contNetwork,
std::unordered_map<std::string, double> &propensities,
size_t nnn);
#endif //ALGO_POISSONTAULEAP_H