00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #if !defined (octave_ComplexCHOL_h)
00026 #define octave_ComplexCHOL_h 1
00027
00028 #include <iosfwd>
00029
00030 #include "CMatrix.h"
00031 #include "CColVector.h"
00032
00033 class
00034 OCTAVE_API
00035 ComplexCHOL
00036 {
00037 public:
00038
00039 ComplexCHOL (void) : chol_mat () { }
00040
00041 ComplexCHOL (const ComplexMatrix& a, bool calc_cond = false) { init (a, calc_cond); }
00042
00043 ComplexCHOL (const ComplexMatrix& a, octave_idx_type& info, bool calc_cond = false)
00044 {
00045 info = init (a, calc_cond);
00046 }
00047
00048 ComplexCHOL (const ComplexCHOL& a)
00049 : chol_mat (a.chol_mat), xrcond (a.xrcond) { }
00050
00051 ComplexCHOL& operator = (const ComplexCHOL& a)
00052 {
00053 if (this != &a)
00054 {
00055 chol_mat = a.chol_mat;
00056 xrcond = a.xrcond;
00057 }
00058
00059 return *this;
00060 }
00061
00062 ComplexMatrix chol_matrix (void) const { return chol_mat; }
00063
00064 double rcond (void) const { return xrcond; }
00065
00066 ComplexMatrix inverse (void) const;
00067
00068 void set (const ComplexMatrix& R);
00069
00070 void update (const ComplexColumnVector& u);
00071
00072 octave_idx_type downdate (const ComplexColumnVector& u);
00073
00074 octave_idx_type insert_sym (const ComplexColumnVector& u, octave_idx_type j);
00075
00076 void delete_sym (octave_idx_type j);
00077
00078 void shift_sym (octave_idx_type i, octave_idx_type j);
00079
00080 friend OCTAVE_API std::ostream& operator << (std::ostream& os, const ComplexCHOL& a);
00081
00082 private:
00083
00084 ComplexMatrix chol_mat;
00085
00086 double xrcond;
00087
00088 octave_idx_type init (const ComplexMatrix& a, bool calc_cond);
00089 };
00090
00091 ComplexMatrix OCTAVE_API chol2inv (const ComplexMatrix& r);
00092
00093 #endif
00094
00095
00096
00097
00098
00099