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
fCmplxCHOL.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_fCmplxCHOL_h)
25 #define octave_fCmplxCHOL_h 1
26 
27 #include <iosfwd>
28 
29 #include "fCMatrix.h"
30 #include "fCColVector.h"
31 
32 class
33 OCTAVE_API
35 {
36 public:
37 
38  FloatComplexCHOL (void) : chol_mat (), xrcond (0) { }
39 
40  FloatComplexCHOL (const FloatComplexMatrix& 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 
57  {
58  if (this != &a)
59  {
60  chol_mat = a.chol_mat;
61  xrcond = a.xrcond;
62  }
63 
64  return *this;
65  }
66 
67  FloatComplexMatrix chol_matrix (void) const { return chol_mat; }
68 
69  float rcond (void) const { return xrcond; }
70 
71  FloatComplexMatrix inverse (void) const;
72 
73  void set (const FloatComplexMatrix& R);
74 
75  void update (const FloatComplexColumnVector& u);
76 
78 
79  octave_idx_type insert_sym (const FloatComplexColumnVector& u,
80  octave_idx_type j);
81 
82  void delete_sym (octave_idx_type j);
83 
84  void shift_sym (octave_idx_type i, octave_idx_type j);
85 
86  friend OCTAVE_API std::ostream& operator << (std::ostream& os,
87  const FloatComplexCHOL& a);
88 
89 private:
90 
92 
93  float xrcond;
94 
95  octave_idx_type init (const FloatComplexMatrix& a, bool calc_cond);
96 };
97 
98 FloatComplexMatrix OCTAVE_API chol2inv (const FloatComplexMatrix& r);
99 
100 #endif
FloatComplexMatrix chol_matrix(void) const
Definition: fCmplxCHOL.h:67
ComplexMatrix inverse(void) const
Definition: CMatrix.cc:1002
FloatComplexCHOL(const FloatComplexCHOL &a)
Definition: fCmplxCHOL.h:53
FloatComplexMatrix OCTAVE_API chol2inv(const FloatComplexMatrix &r)
Definition: fCmplxCHOL.cc:447
FloatComplexCHOL(const FloatComplexMatrix &a, bool calc_cond=false)
Definition: fCmplxCHOL.h:40
ComplexNDArray & operator=(const ComplexNDArray &a)
Definition: CNDArray.h:55
FloatComplexMatrix chol_mat
Definition: fCmplxCHOL.h:91
void downdate(double *c, int n, int d, int *nans, int nnans)
Definition: quadcc.cc:1457
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
FloatComplexCHOL(const FloatComplexMatrix &a, octave_idx_type &info, bool calc_cond=false)
Definition: fCmplxCHOL.h:46
FloatComplexCHOL(void)
Definition: fCmplxCHOL.h:38
float rcond(void) const
Definition: fCmplxCHOL.h:69