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_ComplexLU_h) |
|
25 #define octave_Complex_LU_h 1 |
|
26 |
1296
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
457
|
31 class ostream; |
|
32 |
|
33 #include "dMatrix.h" |
|
34 #include "CMatrix.h" |
|
35 |
1881
|
36 class |
|
37 ComplexLU |
457
|
38 { |
|
39 public: |
|
40 |
1919
|
41 ComplexLU (void) : l (), u (), p (), ipvt (0), pvt (0) { } |
457
|
42 |
|
43 ComplexLU (const ComplexMatrix& a); |
|
44 |
1881
|
45 ComplexLU (const ComplexLU& a) : l (a.l), u (a.u), p (a.p) { } |
457
|
46 |
1528
|
47 ComplexLU& operator = (const ComplexLU& a) |
|
48 { |
1881
|
49 if (this != &a) |
|
50 { |
|
51 l = a.l; |
|
52 u = a.u; |
|
53 p = a.p; |
|
54 } |
1528
|
55 return *this; |
|
56 } |
|
57 |
1919
|
58 ~ComplexLU (void) |
|
59 { |
|
60 delete [] ipvt; |
|
61 delete [] pvt; |
|
62 } |
|
63 |
1528
|
64 ComplexMatrix L (void) const { return l; } |
|
65 ComplexMatrix U (void) const { return u; } |
|
66 |
|
67 Matrix P (void) const { return p; } |
457
|
68 |
|
69 friend ostream& operator << (ostream& os, const ComplexLU& a); |
|
70 |
|
71 private: |
|
72 |
|
73 ComplexMatrix l; |
|
74 ComplexMatrix u; |
|
75 Matrix p; |
1919
|
76 |
|
77 int *ipvt; |
|
78 int *pvt; |
457
|
79 }; |
|
80 |
|
81 #endif |
|
82 |
|
83 /* |
|
84 ;;; Local Variables: *** |
|
85 ;;; mode: C++ *** |
|
86 ;;; page-delimiter: "^/\\*" *** |
|
87 ;;; End: *** |
|
88 */ |