Mercurial > hg > octave-lyh
annotate liboctave/SparseCmplxCHOL.h @ 11449:93b8c7ca211f
isa.m: Add tests against logical types
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 05 Jan 2011 21:21:37 -0800 |
parents | cbc402e64d83 |
children | fd0a3ac60b0e |
rev | line source |
---|---|
5506 | 1 /* |
2 | |
7017 | 3 Copyright (C) 2005, 2006, 2007 David Bateman |
7016 | 4 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Andy Adler |
5 | |
6 This file is part of Octave. | |
5506 | 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 | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
5506 | 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 | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
5506 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_sparse_complex_CHOL_h) | |
25 #define octave_sparse_complex_CHOL_h 1 | |
26 | |
27 #include "sparse-base-chol.h" | |
28 #include "dSparse.h" | |
29 #include "CSparse.h" | |
30 | |
31 class | |
6108 | 32 OCTAVE_API |
5506 | 33 SparseComplexCHOL : |
34 public sparse_base_chol <SparseComplexMatrix, Complex, SparseMatrix> | |
35 { | |
36 public: | |
37 | |
38 SparseComplexCHOL (void) : | |
39 sparse_base_chol<SparseComplexMatrix, Complex, SparseMatrix> () { } | |
40 | |
41 SparseComplexCHOL (const SparseComplexMatrix& a, bool natural = true) : | |
42 sparse_base_chol<SparseComplexMatrix, Complex, SparseMatrix> | |
43 (a, natural) { } | |
44 | |
45 SparseComplexCHOL (const SparseComplexMatrix& a, octave_idx_type& info, | |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
46 bool natural = true) : |
5506 | 47 sparse_base_chol<SparseComplexMatrix, Complex, SparseMatrix> |
48 (a, info, natural) { } | |
49 | |
50 SparseComplexCHOL (const SparseComplexCHOL& a) : | |
51 sparse_base_chol<SparseComplexMatrix, Complex, SparseMatrix> (a) { } | |
52 | |
53 ~SparseComplexCHOL (void) { } | |
54 | |
55 SparseComplexCHOL& operator = (const SparseComplexCHOL& a) | |
56 { | |
57 if (this != &a) | |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
58 sparse_base_chol <SparseComplexMatrix, Complex, SparseMatrix> :: |
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
59 operator = (a); |
5506 | 60 |
61 return *this; | |
62 } | |
63 | |
64 SparseComplexMatrix chol_matrix (void) const { return R(); } | |
65 | |
66 SparseComplexMatrix L (void) const | |
67 { return sparse_base_chol<SparseComplexMatrix, Complex, | |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
68 SparseMatrix>:: L (); } |
5506 | 69 |
70 SparseComplexMatrix R (void) const | |
71 { return sparse_base_chol<SparseComplexMatrix, Complex, | |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
72 SparseMatrix>:: R (); } |
5506 | 73 |
74 octave_idx_type P (void) const | |
75 { return sparse_base_chol<SparseComplexMatrix, Complex, | |
76 SparseMatrix>:: P (); } | |
77 | |
78 ColumnVector perm (void) const | |
79 { return sparse_base_chol<SparseComplexMatrix, Complex, | |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
80 SparseMatrix>:: perm (); } |
5506 | 81 |
82 SparseMatrix Q (void) const | |
83 { return sparse_base_chol<SparseComplexMatrix, Complex, | |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
84 SparseMatrix>:: Q (); } |
5506 | 85 |
86 double rcond (void) const | |
87 { return sparse_base_chol<SparseComplexMatrix, Complex, | |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
88 SparseMatrix>:: rcond (); } |
5506 | 89 |
90 // Compute the inverse of a matrix using the Cholesky factorization. | |
91 SparseComplexMatrix inverse (void) const | |
92 { return sparse_base_chol<SparseComplexMatrix, Complex, | |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
93 SparseMatrix>:: inverse (); } |
5506 | 94 }; |
95 | |
6108 | 96 SparseComplexMatrix OCTAVE_API chol2inv (const SparseComplexMatrix& r); |
5506 | 97 |
98 #endif |