Mercurial > hg > octave-nkf
annotate liboctave/base-lu.h @ 8920:eb63fbe60fab
update copyright notices
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 07 Mar 2009 10:41:27 -0500 |
parents | 445d27d79f4e |
children | 50db3c5175b5 |
rev | line source |
---|---|
1991 | 1 /* |
2 | |
8920 | 3 Copyright (C) 1996, 1997, 2000, 2002, 2004, 2005, 2007, 2008 John W. Eaton |
1991 | 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 | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
1991 | 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 | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
1991 | 20 |
21 */ | |
22 | |
23 #if !defined (octave_base_lu_h) | |
24 #define octave_base_lu_h 1 | |
25 | |
26 #include "MArray.h" | |
7515
f3c00dc0912b
Eliminate the rest of the dispatched sparse functions
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
27 #include "dColVector.h" |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7515
diff
changeset
|
28 #include "PermMatrix.h" |
1991 | 29 |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7515
diff
changeset
|
30 template <class lu_type> |
3585 | 31 class |
32 base_lu | |
1991 | 33 { |
34 public: | |
35 | |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7515
diff
changeset
|
36 typedef typename lu_type::element_type lu_elt_type; |
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7515
diff
changeset
|
37 |
1991 | 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 | |
7515
f3c00dc0912b
Eliminate the rest of the dispatched sparse functions
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
58 lu_type Y (void) const { return a_fact; } |
f3c00dc0912b
Eliminate the rest of the dispatched sparse functions
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
59 |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7515
diff
changeset
|
60 PermMatrix P (void) const; |
1991 | 61 |
7515
f3c00dc0912b
Eliminate the rest of the dispatched sparse functions
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
62 ColumnVector P_vec (void) const; |
f3c00dc0912b
Eliminate the rest of the dispatched sparse functions
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
63 |
1991 | 64 protected: |
65 | |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
7515
diff
changeset
|
66 Array<octave_idx_type> getp (void) const; |
1991 | 67 lu_type a_fact; |
5275 | 68 MArray<octave_idx_type> ipvt; |
1991 | 69 }; |
70 | |
71 #endif | |
72 | |
73 /* | |
74 ;;; Local Variables: *** | |
75 ;;; mode: C++ *** | |
76 ;;; End: *** | |
77 */ |