annotate liboctave/numeric/lu.h @ 30076:43622407af81

maint: rename lu member variable "m_l_fact" to "m_l". * lu.cc, lu.h: Rename lu member variable "m_l_fact" to "m_l".
author Rik <rik@octave.org>
date Mon, 30 Aug 2021 10:52:39 -0700
parents f2062fb507bc
children 51040836259d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ////////////////////////////////////////////////////////////////////////
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 //
29358
0a5b15007766 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
3 // Copyright (C) 1996-2021 The Octave Project Developers
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 // See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 // distribution or <https://octave.org/copyright/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
8 // This file is part of Octave.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
9 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
10 // Octave is free software: you can redistribute it and/or modify it
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
11 // under the terms of the GNU General Public License as published by
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
12 // the Free Software Foundation, either version 3 of the License, or
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
13 // (at your option) any later version.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
14 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
15 // Octave is distributed in the hope that it will be useful, but
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
18 // GNU General Public License for more details.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
19 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
20 // You should have received a copy of the GNU General Public License
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
21 // along with Octave; see the file COPYING. If not, see
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
22 // <https://www.gnu.org/licenses/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ////////////////////////////////////////////////////////////////////////
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
25
21271
7e67c7f82fc1 better use of templates for lu factorization classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
26 #if ! defined (octave_lu_h)
7e67c7f82fc1 better use of templates for lu factorization classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
27 #define octave_lu_h 1
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
28
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
29 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
30
23475
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
31 #include "Array.h"
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
32
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
33 class ColumnVector;
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
34 class PermMatrix;
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
35
22317
6ca3acf5fad8 move some new numeric classes to namespace octave::math
John W. Eaton <jwe@octave.org>
parents: 21271
diff changeset
36 namespace octave
6ca3acf5fad8 move some new numeric classes to namespace octave::math
John W. Eaton <jwe@octave.org>
parents: 21271
diff changeset
37 {
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
38 namespace math
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
39 {
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
40 template <typename T>
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
41 class
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
42 lu
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
43 {
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
44 public:
22317
6ca3acf5fad8 move some new numeric classes to namespace octave::math
John W. Eaton <jwe@octave.org>
parents: 21271
diff changeset
45
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
46 typedef typename T::column_vector_type VT;
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
47 typedef typename T::element_type ELT_T;
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
48
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
49 lu (void)
30076
43622407af81 maint: rename lu member variable "m_l_fact" to "m_l".
Rik <rik@octave.org>
parents: 30058
diff changeset
50 : m_a_fact (), m_l (), m_ipvt () { }
8367
445d27d79f4e support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents: 7515
diff changeset
51
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
52 OCTAVE_API lu (const T& a);
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
53
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
54 lu (const lu& a)
30076
43622407af81 maint: rename lu member variable "m_l_fact" to "m_l".
Rik <rik@octave.org>
parents: 30058
diff changeset
55 : m_a_fact (a.m_a_fact), m_l (a.m_l), m_ipvt (a.m_ipvt) { }
21271
7e67c7f82fc1 better use of templates for lu factorization classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
56
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
57 OCTAVE_API lu (const T& l, const T& u, const PermMatrix& p);
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
58
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
59 lu& operator = (const lu& a)
17769
49a5a4be04a1 maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents: 17744
diff changeset
60 {
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
61 if (this != &a)
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
62 {
30058
f2062fb507bc maint: use "m_" prefix for member variables in class lu.
Rik <rik@octave.org>
parents: 29359
diff changeset
63 m_a_fact = a.m_a_fact;
30076
43622407af81 maint: rename lu member variable "m_l_fact" to "m_l".
Rik <rik@octave.org>
parents: 30058
diff changeset
64 m_l = a.m_l;
30058
f2062fb507bc maint: use "m_" prefix for member variables in class lu.
Rik <rik@octave.org>
parents: 29359
diff changeset
65 m_ipvt = a.m_ipvt;
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
66 }
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
67
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
68 return *this;
17769
49a5a4be04a1 maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents: 17744
diff changeset
69 }
21271
7e67c7f82fc1 better use of templates for lu factorization classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
70
22868
87e3163f6c87 use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents: 22846
diff changeset
71 virtual ~lu (void) = default;
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
72
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
73 OCTAVE_API bool packed (void) const;
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
74
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
75 OCTAVE_API void unpack (void);
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
76
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
77 OCTAVE_API T L (void) const;
9694
50db3c5175b5 allow unpacked form of LU
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
78
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
79 OCTAVE_API T U (void) const;
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
80
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
81 OCTAVE_API T Y (void) const;
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
82
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
83 OCTAVE_API PermMatrix P (void) const;
7515
f3c00dc0912b Eliminate the rest of the dispatched sparse functions
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
84
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
85 OCTAVE_API ColumnVector P_vec (void) const;
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
86
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
87 OCTAVE_API bool regular (void) const;
7515
f3c00dc0912b Eliminate the rest of the dispatched sparse functions
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
88
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
89 OCTAVE_API void update (const VT& u, const VT& v);
9715
9f27172fbd1e auto-set MatrixType from certain functions
Jaroslav Hajek <highegg@gmail.com>
parents: 9694
diff changeset
90
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
91 OCTAVE_API void update (const T& u, const T& v);
21271
7e67c7f82fc1 better use of templates for lu factorization classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
92
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
93 OCTAVE_API void update_piv (const VT& u, const VT& v);
21271
7e67c7f82fc1 better use of templates for lu factorization classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
94
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
95 OCTAVE_API void update_piv (const T& u, const T& v);
21271
7e67c7f82fc1 better use of templates for lu factorization classes
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
96
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
97 protected:
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
98
23475
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
99 // The result of getp is passed to other Octave Matrix functions,
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
100 // so we use octave_idx_type.
29228
5c14f81e0937 Set API tags in files in liboctave/numeric (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents: 27923
diff changeset
101 OCTAVE_API Array<octave_idx_type> getp (void) const;
11505
9a308e96194e more data member initialization fixes
John W. Eaton <jwe@octave.org>
parents: 10521
diff changeset
102
30058
f2062fb507bc maint: use "m_" prefix for member variables in class lu.
Rik <rik@octave.org>
parents: 29359
diff changeset
103 T m_a_fact;
30076
43622407af81 maint: rename lu member variable "m_l_fact" to "m_l".
Rik <rik@octave.org>
parents: 30058
diff changeset
104 T m_l;
11505
9a308e96194e more data member initialization fixes
John W. Eaton <jwe@octave.org>
parents: 10521
diff changeset
105
23475
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
106 // This is internal storage that is passed to Fortran,
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
107 // so we need a Fortran INTEGER.
30058
f2062fb507bc maint: use "m_" prefix for member variables in class lu.
Rik <rik@octave.org>
parents: 29359
diff changeset
108 Array<octave_f77_int_type> m_ipvt;
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
109 };
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
110 }
22317
6ca3acf5fad8 move some new numeric classes to namespace octave::math
John W. Eaton <jwe@octave.org>
parents: 21271
diff changeset
111 }
6ca3acf5fad8 move some new numeric classes to namespace octave::math
John W. Eaton <jwe@octave.org>
parents: 21271
diff changeset
112
1991
413f6a81868f [project @ 1996-03-03 00:40:53 by jwe]
jwe
parents:
diff changeset
113 #endif