/* * CholeskyDecomposition.h * * Created on: 20.05.2011 * Author: sven */ #ifndef CHOLESKYDECOMPOSITION_H_ #define CHOLESKYDECOMPOSITION_H_ #include typedef unsigned int UInt32; typedef std::vector< std::vector > 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_ */