457
|
1 /* |
|
2 |
7017
|
3 Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002, 2004, 2005, 2006, |
|
4 2007 John W. Eaton |
457
|
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 |
7016
|
10 Free Software Foundation; either version 3 of the License, or (at your |
|
11 option) any later version. |
457
|
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 |
7016
|
19 along with Octave; see the file COPYING. If not, see |
|
20 <http://www.gnu.org/licenses/>. |
457
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_ComplexCHOL_h) |
|
25 #define octave_ComplexCHOL_h 1 |
|
26 |
3503
|
27 #include <iostream> |
457
|
28 |
|
29 #include "CMatrix.h" |
|
30 |
1881
|
31 class |
6108
|
32 OCTAVE_API |
1881
|
33 ComplexCHOL |
457
|
34 { |
|
35 public: |
|
36 |
1881
|
37 ComplexCHOL (void) : chol_mat () { } |
1528
|
38 |
6486
|
39 ComplexCHOL (const ComplexMatrix& a, bool calc_cond = false) { init (a, calc_cond); } |
1528
|
40 |
6486
|
41 ComplexCHOL (const ComplexMatrix& a, octave_idx_type& info, bool calc_cond = false) |
1528
|
42 { |
6486
|
43 info = init (a, calc_cond); |
1528
|
44 } |
|
45 |
4055
|
46 ComplexCHOL (const ComplexCHOL& a) |
6486
|
47 : chol_mat (a.chol_mat), xrcond (a.xrcond) { } |
1528
|
48 |
4055
|
49 ComplexCHOL& operator = (const ComplexCHOL& a) |
1528
|
50 { |
1881
|
51 if (this != &a) |
6486
|
52 { |
|
53 chol_mat = a.chol_mat; |
|
54 xrcond = a.xrcond; |
|
55 } |
1528
|
56 |
|
57 return *this; |
|
58 } |
|
59 |
5340
|
60 ComplexMatrix chol_matrix (void) const { return chol_mat; } |
|
61 |
6486
|
62 double rcond (void) const { return xrcond; } |
|
63 |
5340
|
64 ComplexMatrix inverse (void) const; |
457
|
65 |
6108
|
66 friend OCTAVE_API std::ostream& operator << (std::ostream& os, const ComplexCHOL& a); |
457
|
67 |
|
68 private: |
|
69 |
1881
|
70 ComplexMatrix chol_mat; |
457
|
71 |
6486
|
72 double xrcond; |
|
73 |
|
74 octave_idx_type init (const ComplexMatrix& a, bool calc_cond); |
457
|
75 }; |
|
76 |
6108
|
77 ComplexMatrix OCTAVE_API chol2inv (const ComplexMatrix& r); |
5340
|
78 |
457
|
79 #endif |
|
80 |
|
81 /* |
|
82 ;;; Local Variables: *** |
|
83 ;;; mode: C++ *** |
|
84 ;;; End: *** |
|
85 */ |