From f1e27d1a2e3e57404b0aa8fde6be65e80414b207 Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 4 Oct 1996 20:09:17 +0000 Subject: [PATCH] flower-1.0.2 --- flower/choleski.hh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 flower/choleski.hh diff --git a/flower/choleski.hh b/flower/choleski.hh new file mode 100644 index 0000000000..c6cb91723b --- /dev/null +++ b/flower/choleski.hh @@ -0,0 +1,46 @@ +#ifndef CHOLESKI_HH +#define CHOLESKI_HH + +#include "matrix.hh" + +struct Choleski_decomposition { + + /// lower triangle of Choleski decomposition + Matrix L; + + /// diagonal + Vector D; + ///Create decomposition of P + Choleski_decomposition(Matrix P); + /** + PRE + P needs to be symmetric positive definite + */ + + Vector solve(Vector rhs) const; + Vector operator * (Vector rhs) const { return solve (rhs); } + /** + solve Px = rhs + */ + + Matrix inverse() const; + /** + return the inverse of the matrix P. + */ + + Matrix original() const; + /** + return P, calc'ed from L and D + */ + +}; +/** + structure for using the LU decomposition of a positive definite . + + #P# is split into + + LD transpose(L) + */ + + +#endif -- 2.39.5