-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBranches3.h
55 lines (41 loc) · 1.89 KB
/
Branches3.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
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// Branches3.h
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#ifndef Branches3H
#define Branches3H
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <vector>
#include <Eigen/Dense>
#include "BranchesBase.h"
class PseudoFactory;
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// Class Branches3 : public BranchesBase
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
class Branches3 : public BranchesBase
{
public:
explicit Branches3(PseudoFactory &);
long GetBranches() const {return branches_;}
long GetUpBranches() const {return up_branches_;}
double Getdz() const {return dz_;}
double GetDrift() const{return drift_;}
double NextValue(long j, std::vector<double> & vec) const;
double NextV(long i,long j, Eigen::MatrixXd & vec) const ;
private:
const double CRITICAL_KAPPA_; //The critical value of kappa
void ComputeProbs();
const long branches_; // # branches
const long up_branches_; // # up branches
double kappa_; // branching parameter
double r_;
double sig;
double dt_; // time step
double dz_; // space step
double drift_;
std::vector<double> probs_; //branching probs
};
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#endif
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// End
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX