457
|
1 // -*- C++ -*- |
|
2 /* |
|
3 |
1881
|
4 Copyright (C) 1996 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 |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 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, write to the Free |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
457
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_ComplexQR_h) |
|
25 #define octave_ComplexQR_h 1 |
|
26 |
1296
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
457
|
31 class ostream; |
|
32 |
|
33 #include "CMatrix.h" |
539
|
34 #include "dbleQR.h" |
457
|
35 |
1881
|
36 class |
|
37 ComplexQR |
457
|
38 { |
|
39 public: |
|
40 |
1921
|
41 ComplexQR (void) : q (), r (), tau (0), work (0), tmp_data (0) { } |
457
|
42 |
539
|
43 ComplexQR (const ComplexMatrix& A, QR::type qr_type = QR::std); |
457
|
44 |
1881
|
45 ComplexQR (const ComplexQR& a) : q (a.q), r (a.r) { } |
457
|
46 |
1528
|
47 ComplexQR& operator = (const ComplexQR& a) |
|
48 { |
1881
|
49 if (this != &a) |
|
50 { |
|
51 q = a.q; |
|
52 r = a.r; |
|
53 } |
1528
|
54 return *this; |
|
55 } |
|
56 |
1921
|
57 ~ComplexQR (void) |
|
58 { |
|
59 delete [] tau; |
|
60 delete [] work; |
|
61 delete [] tmp_data; |
|
62 } |
|
63 |
1528
|
64 ComplexMatrix Q (void) const { return q; } |
|
65 ComplexMatrix R (void) const { return r; } |
457
|
66 |
|
67 friend ostream& operator << (ostream& os, const ComplexQR& a); |
|
68 |
539
|
69 protected: |
457
|
70 |
|
71 ComplexMatrix q; |
|
72 ComplexMatrix r; |
1921
|
73 |
|
74 Complex *tau; |
|
75 Complex *work; |
|
76 Complex *tmp_data; |
457
|
77 }; |
|
78 |
|
79 #endif |
|
80 |
|
81 /* |
|
82 ;;; Local Variables: *** |
|
83 ;;; mode: C++ *** |
|
84 ;;; page-delimiter: "^/\\*" *** |
|
85 ;;; End: *** |
|
86 */ |