]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/choleski.hh
release: 0.1.12
[lilypond.git] / flower / include / choleski.hh
index a1c3a8c47e172b718d0bb9053e9a6cdf8ac1e9ad..f4b5e2981499438255bd4b0cd5613ff82bfdd012 100644 (file)
     */
 struct Choleski_decomposition {
 
-    /// lower triangle of Choleski decomposition
-    Matrix L;
+  /// lower triangle of Choleski decomposition
+  Matrix L;
 
-    /// diagonal 
-    Vector D;
+  /// diagonal 
+  Vector D;
 
-    /** Create decomposition of P. 
+  /** 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