1991
|
1 // -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1996 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_base_lu_h) |
|
25 #define octave_base_lu_h 1 |
|
26 |
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
|
31 #include "MArray.h" |
|
32 |
|
33 template <class lu_type, class p_type> |
|
34 class base_lu |
|
35 { |
|
36 public: |
|
37 |
|
38 base_lu (void) { } |
|
39 |
|
40 base_lu (const base_lu& a) : a_fact (a.a_fact), ipvt (a.ipvt) { } |
|
41 |
|
42 base_lu& operator = (const base_lu& a) |
|
43 { |
|
44 if (this != &a) |
|
45 { |
|
46 a_fact = a.a_fact; |
|
47 ipvt = a.ipvt; |
|
48 } |
|
49 return *this; |
|
50 } |
|
51 |
|
52 ~base_lu (void) { } |
|
53 |
|
54 lu_type L (void) const; |
|
55 |
|
56 lu_type U (void) const; |
|
57 |
|
58 p_type P (void) const; |
|
59 |
|
60 protected: |
|
61 |
|
62 lu_type a_fact; |
|
63 MArray<int> ipvt; |
|
64 }; |
|
65 |
|
66 #endif |
|
67 |
|
68 /* |
|
69 ;;; Local Variables: *** |
|
70 ;;; mode: C++ *** |
|
71 ;;; page-delimiter: "^/\\*" *** |
|
72 ;;; End: *** |
|
73 */ |