457
|
1 // -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1992, 1993, 1994 John W. Eaton |
|
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 |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_ComplexLU_h) |
|
25 #define octave_Complex_LU_h 1 |
|
26 |
|
27 class ostream; |
|
28 |
|
29 #include "dMatrix.h" |
|
30 #include "CMatrix.h" |
|
31 |
|
32 extern "C++" { |
|
33 |
|
34 class ComplexLU |
|
35 { |
|
36 friend class ComplexMatrix; |
|
37 |
|
38 public: |
|
39 |
|
40 ComplexLU (void) {} |
|
41 |
|
42 ComplexLU (const ComplexMatrix& a); |
|
43 |
|
44 ComplexLU (const ComplexLU& a); |
|
45 |
|
46 ComplexLU& operator = (const ComplexLU& a); |
|
47 |
|
48 ComplexMatrix L (void) const; |
|
49 ComplexMatrix U (void) const; |
|
50 Matrix P (void) const; |
|
51 |
|
52 friend ostream& operator << (ostream& os, const ComplexLU& a); |
|
53 |
|
54 private: |
|
55 |
|
56 ComplexMatrix l; |
|
57 ComplexMatrix u; |
|
58 Matrix p; |
|
59 }; |
|
60 |
|
61 inline ComplexLU::ComplexLU (const ComplexLU& a) |
|
62 { |
|
63 l = a.l; |
|
64 u = a.u; |
|
65 p = a.p; |
|
66 } |
|
67 |
|
68 inline ComplexLU& ComplexLU::operator = (const ComplexLU& a) |
|
69 { |
|
70 l = a.l; |
|
71 u = a.u; |
|
72 p = a.p; |
|
73 return *this; |
|
74 } |
|
75 |
|
76 inline ComplexMatrix ComplexLU::L (void) const |
|
77 { |
|
78 return l; |
|
79 } |
|
80 |
|
81 inline ComplexMatrix ComplexLU::U (void) const |
|
82 { |
|
83 return u; |
|
84 } |
|
85 |
|
86 inline Matrix ComplexLU::P (void) const |
|
87 { |
|
88 return p; |
|
89 } |
|
90 |
|
91 } // extern "C++" |
|
92 |
|
93 #endif |
|
94 |
|
95 /* |
|
96 ;;; Local Variables: *** |
|
97 ;;; mode: C++ *** |
|
98 ;;; page-delimiter: "^/\\*" *** |
|
99 ;;; End: *** |
|
100 */ |