annotate liboctave/base-lu.h @ 8710:739141cde75a ss-3-1-52

fix typo in Array-f.cc
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 09 Feb 2009 21:51:31 +0100
parents 445d27d79f4e
children eb63fbe60fab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
1 /*
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
2
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
3 Copyright (C) 1996, 1997, 2000, 2002, 2004, 2005, 2007 John W. Eaton
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
4
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
6
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
10 option) any later version.
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
11
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
15 for more details.
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
16
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5307
diff changeset
19 <http://www.gnu.org/licenses/>.
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
20
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
21 */
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
22
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
23 #if !defined (octave_base_lu_h)
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
24 #define octave_base_lu_h 1
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
25
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
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
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
29
8367
445d27d79f4e support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents: 7515
diff changeset
30 template <class lu_type>
3585
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 2847
diff changeset
31 class
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 2847
diff changeset
32 base_lu
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
33 {
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
34 public:
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
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
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
38 base_lu (void) { }
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
39
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
40 base_lu (const base_lu& a) : a_fact (a.a_fact), ipvt (a.ipvt) { }
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
41
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
42 base_lu& operator = (const base_lu& a)
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
43 {
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
44 if (this != &a)
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
45 {
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
46 a_fact = a.a_fact;
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
47 ipvt = a.ipvt;
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
48 }
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
49 return *this;
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
50 }
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
51
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
52 ~base_lu (void) { }
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
53
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
54 lu_type L (void) const;
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
55
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
56 lu_type U (void) const;
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
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
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
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
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
64 protected:
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
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
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
67 lu_type a_fact;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
68 MArray<octave_idx_type> ipvt;
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
69 };
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
70
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
71 #endif
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
72
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
73 /*
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
74 ;;; Local Variables: ***
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
75 ;;; mode: C++ ***
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
76 ;;; End: ***
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
77 */