summaryrefslogtreecommitdiffstats
path: root/Master/Modellbildung_und_Simulation/Aufgabenblatt2/Aufgabe2und3/src/CholeskyDecomposition.h
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Modellbildung_und_Simulation/Aufgabenblatt2/Aufgabe2und3/src/CholeskyDecomposition.h
downloadStudium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz
Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Modellbildung_und_Simulation/Aufgabenblatt2/Aufgabe2und3/src/CholeskyDecomposition.h')
-rw-r--r--Master/Modellbildung_und_Simulation/Aufgabenblatt2/Aufgabe2und3/src/CholeskyDecomposition.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/Master/Modellbildung_und_Simulation/Aufgabenblatt2/Aufgabe2und3/src/CholeskyDecomposition.h b/Master/Modellbildung_und_Simulation/Aufgabenblatt2/Aufgabe2und3/src/CholeskyDecomposition.h
new file mode 100644
index 0000000..b7bdb6c
--- /dev/null
+++ b/Master/Modellbildung_und_Simulation/Aufgabenblatt2/Aufgabe2und3/src/CholeskyDecomposition.h
@@ -0,0 +1,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_ */