457
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
457
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
7016
|
9 Free Software Foundation; either version 3 of the License, or (at your |
|
10 option) any later version. |
457
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
7016
|
18 along with Octave; see the file COPYING. If not, see |
|
19 <http://www.gnu.org/licenses/>. |
457
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_ComplexCHOL_h) |
|
24 #define octave_ComplexCHOL_h 1 |
|
25 |
3503
|
26 #include <iostream> |
457
|
27 |
|
28 #include "CMatrix.h" |
|
29 |
1881
|
30 class |
6108
|
31 OCTAVE_API |
1881
|
32 ComplexCHOL |
457
|
33 { |
|
34 public: |
|
35 |
1881
|
36 ComplexCHOL (void) : chol_mat () { } |
1528
|
37 |
6486
|
38 ComplexCHOL (const ComplexMatrix& a, bool calc_cond = false) { init (a, calc_cond); } |
1528
|
39 |
6486
|
40 ComplexCHOL (const ComplexMatrix& a, octave_idx_type& info, bool calc_cond = false) |
1528
|
41 { |
6486
|
42 info = init (a, calc_cond); |
1528
|
43 } |
|
44 |
4055
|
45 ComplexCHOL (const ComplexCHOL& a) |
6486
|
46 : chol_mat (a.chol_mat), xrcond (a.xrcond) { } |
1528
|
47 |
4055
|
48 ComplexCHOL& operator = (const ComplexCHOL& a) |
1528
|
49 { |
1881
|
50 if (this != &a) |
6486
|
51 { |
|
52 chol_mat = a.chol_mat; |
|
53 xrcond = a.xrcond; |
|
54 } |
1528
|
55 |
|
56 return *this; |
|
57 } |
|
58 |
5340
|
59 ComplexMatrix chol_matrix (void) const { return chol_mat; } |
|
60 |
6486
|
61 double rcond (void) const { return xrcond; } |
|
62 |
5340
|
63 ComplexMatrix inverse (void) const; |
457
|
64 |
6108
|
65 friend OCTAVE_API std::ostream& operator << (std::ostream& os, const ComplexCHOL& a); |
457
|
66 |
|
67 private: |
|
68 |
1881
|
69 ComplexMatrix chol_mat; |
457
|
70 |
6486
|
71 double xrcond; |
|
72 |
|
73 octave_idx_type init (const ComplexMatrix& a, bool calc_cond); |
457
|
74 }; |
|
75 |
6108
|
76 ComplexMatrix OCTAVE_API chol2inv (const ComplexMatrix& r); |
5340
|
77 |
457
|
78 #endif |
|
79 |
|
80 /* |
|
81 ;;; Local Variables: *** |
|
82 ;;; mode: C++ *** |
|
83 ;;; End: *** |
|
84 */ |