GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CmplxCHOL.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2015 John W. Eaton
4 Copyright (C) 2008-2009 Jaroslav Hajek
5 
6 This file is part of Octave.
7 
8 Octave is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the
10 Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
12 
13 Octave is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with Octave; see the file COPYING. If not, see
20 <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #if !defined (octave_CmplxCHOL_h)
25 #define octave_CmplxCHOL_h 1
26 
27 #include <iosfwd>
28 
29 #include "CMatrix.h"
30 #include "CColVector.h"
31 
32 class
33 OCTAVE_API
35 {
36 public:
37 
38  ComplexCHOL (void) : chol_mat (), xrcond (0) { }
39 
40  ComplexCHOL (const ComplexMatrix& a, bool calc_cond = false)
41  : chol_mat (), xrcond (0)
42  {
43  init (a, calc_cond);
44  }
45 
47  bool calc_cond = false)
48  : chol_mat (), xrcond (0)
49  {
50  info = init (a, calc_cond);
51  }
52 
54  : chol_mat (a.chol_mat), xrcond (a.xrcond) { }
55 
56  ComplexCHOL& operator = (const ComplexCHOL& a)
57  {
58  if (this != &a)
59  {
60  chol_mat = a.chol_mat;
61  xrcond = a.xrcond;
62  }
63 
64  return *this;
65  }
66 
67  ComplexMatrix chol_matrix (void) const { return chol_mat; }
68 
69  double rcond (void) const { return xrcond; }
70 
71  ComplexMatrix inverse (void) const;
72 
73  void set (const ComplexMatrix& R);
74 
75  void update (const ComplexColumnVector& u);
76 
78 
79  octave_idx_type insert_sym (const ComplexColumnVector& u, octave_idx_type j);
80 
81  void delete_sym (octave_idx_type j);
82 
83  void shift_sym (octave_idx_type i, octave_idx_type j);
84 
85  friend OCTAVE_API std::ostream& operator << (std::ostream& os,
86  const ComplexCHOL& a);
87 
88 private:
89 
91 
92  double xrcond;
93 
94  octave_idx_type init (const ComplexMatrix& a, bool calc_cond);
95 };
96 
97 ComplexMatrix OCTAVE_API chol2inv (const ComplexMatrix& r);
98 
99 #endif
double rcond(void) const
Definition: CmplxCHOL.h:69
ComplexCHOL(const ComplexMatrix &a, bool calc_cond=false)
Definition: CmplxCHOL.h:40
ComplexMatrix chol_mat
Definition: CmplxCHOL.h:90
ComplexCHOL(void)
Definition: CmplxCHOL.h:38
void downdate(double *c, int n, int d, int *nans, int nnans)
Definition: quadcc.cc:1457
ComplexMatrix chol_matrix(void) const
Definition: CmplxCHOL.h:67
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
ComplexCHOL(const ComplexMatrix &a, octave_idx_type &info, bool calc_cond=false)
Definition: CmplxCHOL.h:46
ComplexMatrix OCTAVE_API chol2inv(const ComplexMatrix &r)
Definition: CmplxCHOL.cc:443
double xrcond
Definition: CmplxCHOL.h:92
ComplexCHOL(const ComplexCHOL &a)
Definition: CmplxCHOL.h:53