libspatialSEIR  0.1
Bayesian Spatial SEIR Modeling
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
CovariateMatrix.hpp
Go to the documentation of this file.
1 /*Copyright 2014, Grant Brown*/
2 
3 #ifndef SPATIALSEIR_INCLUDEFILES
4 #define SPATIALSEIR_INCLUDEFILES
5 
6 #include<iostream>
7 #include<stdio.h>
8 #include<math.h>
9 #include<cstring>
10 #include<vector>
11 #endif
12 
13 #ifndef COVARIATE_MATRIX_INC
14 #define COVARIATE_MATRIX_INC
15 
16 namespace SpatialSEIR
17 {
18 
20  {
21  double* inData_x;
22  double* inData_z;
23  int* inRow_x;
24  int* inCol_x;
25  int* inRow_z;
26  int* inCol_z;
27  };
28 
30  {
31  public:
32  // Methods
33 
34  int genFromDataStream(double *indata_x, double *indata_z,
35  int *inrow_x, int *incol_x,
36  int *inrow_z, int *incol_z);
37 
38  // Eta function for X only covariate structures.
39  int calculate_fixed_eta_CPU(double *eta, double *beta);
40  // Eta functions for combined (beta, gamma) vectors.
41  int calculate_eta_CPU(double *eta, double *beta);
42  int calculate_eta_OCL(double *eta, double *beta);
43 
45 
47  // Attributes
48  double *X; // Time invariant covariates
49  double *Z; // Time varying covariates
51  double *offset;
53  std::vector<std::string>* varnames;
54  int *nrow_x;
55  int *ncol_x;
56  int *nrow_z;
57  int *ncol_z;
58 
59  };
60 }
61 
62 #endif
int * nrow_z
Definition: CovariateMatrix.hpp:56
int calculate_eta_OCL(double *eta, double *beta)
~CovariateMatrix()
Definition: CovariateMatrix.cpp:226
Definition: CovariateMatrix.hpp:29
void buildDecorrelationProjectionMatrix()
Definition: CovariateMatrix.cpp:62
double * decorrelationProjectionMatrix
Definition: CovariateMatrix.hpp:50
int * ncol_x
Definition: CovariateMatrix.hpp:55
int calculate_eta_CPU(double *eta, double *beta)
Definition: CovariateMatrix.cpp:179
int * inCol_x
Definition: CovariateMatrix.hpp:24
int calculate_fixed_eta_CPU(double *eta, double *beta)
Definition: CovariateMatrix.cpp:150
Definition: CovariateMatrix.hpp:19
int * offsetLength
Definition: CovariateMatrix.hpp:52
int * inRow_z
Definition: CovariateMatrix.hpp:25
int * ncol_z
Definition: CovariateMatrix.hpp:57
double * X
Definition: CovariateMatrix.hpp:48
double * offset
Definition: CovariateMatrix.hpp:51
double * inData_x
Definition: CovariateMatrix.hpp:21
int * inCol_z
Definition: CovariateMatrix.hpp:26
int * inRow_x
Definition: CovariateMatrix.hpp:23
int genFromDataStream(double *indata_x, double *indata_z, int *inrow_x, int *incol_x, int *inrow_z, int *incol_z)
Definition: CovariateMatrix.cpp:15
double * Z
Definition: CovariateMatrix.hpp:49
std::vector< std::string > * varnames
Definition: CovariateMatrix.hpp:53
int * nrow_x
Definition: CovariateMatrix.hpp:54
double * inData_z
Definition: CovariateMatrix.hpp:22