blob: b7bdb6cba668c669a8590c82f34ba13752c55d11 (
plain)
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
|
/*
* CholeskyDecomposition.h
*
* Created on: 20.05.2011
* Author: sven
*/
#ifndef CHOLESKYDECOMPOSITION_H_
#define CHOLESKYDECOMPOSITION_H_
#include <vector>
typedef unsigned int UInt32;
typedef std::vector< std::vector<double> > CholeskyMatrix;
class CholeskyDecomposition {
public:
CholeskyDecomposition();
virtual ~CholeskyDecomposition();
void calcCholeskyDecompostions(const Parametrisation& params);
const CholeskyMatrix& getMatrix(const enHoldingTime& holdingTime) const
{
switch(holdingTime)
{
case nenOneDay:
return mCholeskyMatrixOneDay;
case nenTenDays:
return mCholeskyMatrixTenDays;
default:
throw 17;
}
}
private:
CholeskyMatrix mCholeskyMatrixOneDay;
CholeskyMatrix mCholeskyMatrixTenDays;
void dumpCholeskyMatrices();
void calcCholeskyMatrix(CholeskyMatrix& d, const CovarianceMatrix& b);
};
#endif /* CHOLESKYDECOMPOSITION_H_ */
|