]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/choleski.hh
release: 1.1.0
[lilypond.git] / flower / include / choleski.hh
index abd19ee67635a42476b06dca6944d9691a2d55d3..c6db243ba8e1c0ee6f03fcfbd633ae56086b09b4 100644 (file)
@@ -9,42 +9,44 @@
 
     #P# is split  into
 
-    LD transpose(L)
+    LD transpose (L)
     */
 struct Choleski_decomposition {
 
-    /// lower triangle of Choleski decomposition
-    Matrix L;
+  /// lower triangle of Choleski decomposition
+  Matrix L;
 
-    /// diagonal 
-    Vector D;
+  bool band_b_;
 
-    /** Create decomposition of P. 
+  /// diagonal 
+  Vector D;
+
+  /** Create decomposition of P. 
     PRE
     P needs to be symmetric positive definite
     */
     
-    Choleski_decomposition(Matrix const &P);
+  Choleski_decomposition (Matrix const &P);
 
-    /**
+  /**
     solve Px = rhs
     */
-    Vector solve(Vector rhs) const;
-    void solve (Vector &dest, Vector const &rhs)const;
-    Vector operator * (Vector rhs) const { return solve (rhs); }
+  Vector solve (Vector rhs) const;
+  void solve (Vector &dest, Vector const &rhs) const;
+  Vector operator * (Vector rhs) const { return solve (rhs); }
   /**
     return the inverse of the matrix P.
     */
-    Matrix inverse() const;
-    /**
+  Matrix inverse() const;
+  /**
     return P,  calc'ed from L and D
     */
-    Matrix original() const;
+  Matrix original() const;
 private:
-    void full_matrix_solve(Vector &,Vector const&)const;
-    void band_matrix_solve(Vector &, Vector const&)const;
-    void full_matrix_decompose(Matrix const & P);
-    void band_matrix_decompose(Matrix const &P);
+  void full_matrix_solve (Vector &,Vector const&) const;
+  void band_matrix_solve (Vector &, Vector const&) const;
+  void full_matrix_decompose (Matrix const & P);
+  void band_matrix_decompose (Matrix const &P);
         
 };
 #endif