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 |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
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 |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
457
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_QR_h) |
|
25 #define octave_QR_h 1 |
|
26 |
3503
|
27 #include <iostream> |
457
|
28 |
|
29 #include "dMatrix.h" |
|
30 |
1881
|
31 class |
|
32 QR |
457
|
33 { |
|
34 public: |
|
35 |
539
|
36 enum type |
|
37 { |
|
38 std, |
|
39 raw, |
2802
|
40 economy |
539
|
41 }; |
|
42 |
1927
|
43 QR (void) : q (), r () { } |
457
|
44 |
2763
|
45 QR (const Matrix&, QR::type = QR::std); |
457
|
46 |
1881
|
47 QR (const QR& a) : q (a.q), r (a.r) { } |
457
|
48 |
1528
|
49 QR& operator = (const QR& a) |
|
50 { |
1881
|
51 if (this != &a) |
|
52 { |
|
53 q = a.q; |
|
54 r = a.r; |
|
55 } |
1528
|
56 return *this; |
|
57 } |
|
58 |
1927
|
59 ~QR (void) { } |
1921
|
60 |
2763
|
61 void init (const Matrix&, QR::type); |
|
62 |
1528
|
63 Matrix Q (void) const { return q; } |
|
64 |
|
65 Matrix R (void) const { return r; } |
457
|
66 |
3504
|
67 friend std::ostream& operator << (std::ostream&, const QR&); |
457
|
68 |
539
|
69 protected: |
457
|
70 |
|
71 Matrix q; |
|
72 Matrix r; |
|
73 }; |
|
74 |
|
75 #endif |
|
76 |
|
77 /* |
|
78 ;;; Local Variables: *** |
|
79 ;;; mode: C++ *** |
|
80 ;;; End: *** |
|
81 */ |