annotate liboctave/numeric/sparse-chol.h @ 27919:1891570abac8

update Octave Project Developers copyright for the new year In files that have the "Octave Project Developers" copyright notice, update for 2020.
author John W. Eaton <jwe@octave.org>
date Mon, 06 Jan 2020 22:29:51 -0500
parents b442ec6dda5c
children bd51beb6205e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
1 /*
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
2
27919
1891570abac8 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 27918
diff changeset
3 Copyright (C) 1998-2020 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
4
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
5 See the file COPYRIGHT.md in the top-level directory of this distribution
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
6 or <https://octave.org/COPYRIGHT.html/>.
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
7
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5512
diff changeset
8
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5512
diff changeset
9 This file is part of Octave.
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
10
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23475
diff changeset
11 Octave is free software: you can redistribute it and/or modify it
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22402
diff changeset
12 under the terms of the GNU General Public License as published by
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23475
diff changeset
13 the Free Software Foundation, either version 3 of the License, or
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22402
diff changeset
14 (at your option) any later version.
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
15
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22402
diff changeset
16 Octave is distributed in the hope that it will be useful, but
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22402
diff changeset
17 WITHOUT ANY WARRANTY; without even the implied warranty of
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22402
diff changeset
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22402
diff changeset
19 GNU General Public License for more details.
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
20
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
21 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: 5512
diff changeset
22 along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23475
diff changeset
23 <https://www.gnu.org/licenses/>.
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
24
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
25 */
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
26
21145
307096fb67e1 revamp sparse Cholesky factorization classes
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
27 #if ! defined (octave_sparse_chol_h)
307096fb67e1 revamp sparse Cholesky factorization classes
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
28 #define octave_sparse_chol_h 1
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
29
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21186
diff changeset
30 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21186
diff changeset
31
25149
dd774017866b allow most headers to be included alone (bug #53505)
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
32 #include "CSparse.h"
dd774017866b allow most headers to be included alone (bug #53505)
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
33
23475
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
34 class RowVector;
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
35 class SparseMatrix;
d691ed308237 maint: Clean up #includes in liboctave/numeric directory.
Rik <rik@octave.org>
parents: 23220
diff changeset
36 class SparseComplexMatrix;
5512
7c8767d0ffc0 [project @ 2005-10-27 02:20:17 by jwe]
jwe
parents: 5511
diff changeset
37
22317
6ca3acf5fad8 move some new numeric classes to namespace octave::math
John W. Eaton <jwe@octave.org>
parents: 22229
diff changeset
38 namespace octave
6ca3acf5fad8 move some new numeric classes to namespace octave::math
John W. Eaton <jwe@octave.org>
parents: 22229
diff changeset
39 {
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
40 namespace math
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
41 {
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
42 // If the sparse matrix classes become templated on the element type
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
43 // (i.e., sparse_matrix<double>), then it might be best to make the
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
44 // template parameter of this class also be the element type instead
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
45 // of the matrix type.
21177
a10f60e13243 style fixes in liboctave/numeric directory
John W. Eaton <jwe@octave.org>
parents: 21145
diff changeset
46
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
47 template <typename chol_type>
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
48 class
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
49 sparse_chol
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
50 {
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
51 public:
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
52
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
53 sparse_chol (void);
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
54
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
55 sparse_chol (const chol_type& a, bool natural, bool force);
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
56
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
57 sparse_chol (const chol_type& a, octave_idx_type& info,
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
58 bool natural, bool force);
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
59
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
60 sparse_chol (const chol_type& a, octave_idx_type& info, bool natural);
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
61
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
62 sparse_chol (const chol_type& a, octave_idx_type& info);
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
63
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
64 sparse_chol (const sparse_chol<chol_type>& a);
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
65
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
66 virtual ~sparse_chol (void);
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
67
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
68 sparse_chol& operator = (const sparse_chol& a);
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
69
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
70 chol_type L (void) const;
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
71
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
72 chol_type R (void) const { return L ().hermitian (); }
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
73
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
74 octave_idx_type P (void) const;
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
75
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
76 RowVector perm (void) const;
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
77
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
78 SparseMatrix Q (void) const;
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
79
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
80 bool is_positive_definite (void) const;
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
81
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
82 double rcond (void) const;
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
83
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
84 chol_type inverse (void) const;
21145
307096fb67e1 revamp sparse Cholesky factorization classes
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
85
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
86 protected:
21145
307096fb67e1 revamp sparse Cholesky factorization classes
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
87
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
88 typedef typename chol_type::element_type chol_elt;
21145
307096fb67e1 revamp sparse Cholesky factorization classes
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
89
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
90 class sparse_chol_rep;
21145
307096fb67e1 revamp sparse Cholesky factorization classes
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
91
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
92 private:
21145
307096fb67e1 revamp sparse Cholesky factorization classes
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
93
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
94 sparse_chol_rep *rep;
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
95 };
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
96
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
97 template <typename chol_type>
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
98 chol_type
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
99 chol2inv (const chol_type& r);
21145
307096fb67e1 revamp sparse Cholesky factorization classes
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
100
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
101 // SparseComplexMatrix specialization.
21145
307096fb67e1 revamp sparse Cholesky factorization classes
John W. Eaton <jwe@octave.org>
parents: 21139
diff changeset
102
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
103 template <>
22402
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22329
diff changeset
104 sparse_chol<SparseComplexMatrix>::sparse_chol
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22329
diff changeset
105 (const SparseComplexMatrix& a, octave_idx_type& info);
22329
7f3c7a8bd131 maint: Indent namespaces in liboctave/numeric files.
John W. Eaton <jwe@octave.org>
parents: 22323
diff changeset
106 }
22317
6ca3acf5fad8 move some new numeric classes to namespace octave::math
John W. Eaton <jwe@octave.org>
parents: 22229
diff changeset
107 }
6ca3acf5fad8 move some new numeric classes to namespace octave::math
John W. Eaton <jwe@octave.org>
parents: 22229
diff changeset
108
5506
b4cfbb0ec8c4 [project @ 2005-10-23 19:09:32 by dbateman]
dbateman
parents:
diff changeset
109 #endif