]> git.donarmstrong.com Git - lilypond.git/blob - choleski.hh
release: 0.0.2
[lilypond.git] / choleski.hh
1 #ifndef CHOLESKI_HH
2 #define CHOLESKI_HH
3
4 #include "matrix.hh"
5
6 struct Choleski_decomposition {
7
8     /// lower triangle of Choleski decomposition
9     Matrix L;
10
11     /// diagonal 
12     Vector D;
13     ///Create decomposition of P
14     Choleski_decomposition(Matrix P);
15     /**
16     PRE
17     P needs to be symmetric positive definite
18     */
19     
20     Vector solve(Vector rhs) const;
21     Vector operator * (Vector rhs) const { return solve (rhs); }
22     /**
23     solve Px = rhs
24     */
25
26     Matrix inverse() const;
27     /**
28     return the inverse of the matrix P.
29     */
30
31     Matrix original() const;
32     /**
33     return P,  calc'ed from L and D
34     */
35          
36 };
37 /**
38     structure for using the LU decomposition of a positive definite .
39
40     #P# is split  into
41
42     LD transpose(L)
43     */
44     
45
46 #endif