Mercurial > octave
annotate liboctave/operators/mx-defs.h @ 21269:3c8a3d35661a
better use of templates for Cholesky factorization
* liboctave/numeric/chol.h, liboctave/numeric/chol.cc: New files
generated from CmplxCHOL.cc, fCmplxCHOL.cc, floatCHOL.cc, CmplxCHOL.h,
dbleCHOL.cc, dbleCHOL.h, fCmplxCHOL.h, and floatCHOL.h and converted
to templates.
* liboctave/numeric/module.mk: Update.
* __qp__.cc, chol.cc, CMatrix.cc, CMatrix.h, dMatrix.cc, dMatrix.h,
fCMatrix.cc, fCMatrix.h, fMatrix.cc, fMatrix.h, eigs-base.cc,
mx-defs.h, mx-ext.h: Use new classes.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 16 Feb 2016 02:47:29 -0500 |
parents | f08ae27289e4 |
children | 7e67c7f82fc1 |
rev | line source |
---|---|
460 | 1 /* |
2 | |
19697
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
3 Copyright (C) 1994-2015 John W. Eaton |
460 | 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. | |
460 | 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/>. | |
460 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
23 #if ! defined (octave_mx_defs_h) |
460 | 24 #define octave_mx_defs_h 1 |
25 | |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21202
diff
changeset
|
26 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21202
diff
changeset
|
27 |
460 | 28 // Classes we declare. |
29 | |
30 class Matrix; | |
1574 | 31 class ComplexMatrix; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
32 class FloatMatrix; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
33 class FloatComplexMatrix; |
2828 | 34 class boolMatrix; |
1574 | 35 class charMatrix; |
36 | |
4543 | 37 class NDArray; |
38 class ComplexNDArray; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
39 class FloatNDArray; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
40 class FloatComplexNDArray; |
4543 | 41 class boolNDArray; |
42 class charNDArray; | |
43 | |
460 | 44 class ColumnVector; |
1574 | 45 class ComplexColumnVector; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
46 class FloatColumnVector; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
47 class FloatComplexColumnVector; |
1574 | 48 |
460 | 49 class RowVector; |
1574 | 50 class ComplexRowVector; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
51 class FloatRowVector; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
52 class FloatComplexRowVector; |
1574 | 53 |
460 | 54 class DiagMatrix; |
55 class ComplexDiagMatrix; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
56 class FloatDiagMatrix; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
57 class FloatComplexDiagMatrix; |
1574 | 58 |
8367
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8335
diff
changeset
|
59 class PermMatrix; |
445d27d79f4e
support permutation matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8335
diff
changeset
|
60 |
21268
f08ae27289e4
better use of templates for balance classes
John W. Eaton <jwe@octave.org>
parents:
21267
diff
changeset
|
61 template <typename T> class aepbalance; |
1574 | 62 |
21268
f08ae27289e4
better use of templates for balance classes
John W. Eaton <jwe@octave.org>
parents:
21267
diff
changeset
|
63 template <typename T> class gepbalance; |
1574 | 64 |
21269
3c8a3d35661a
better use of templates for Cholesky factorization
John W. Eaton <jwe@octave.org>
parents:
21268
diff
changeset
|
65 template <typename T> class chol; |
1574 | 66 |
460 | 67 class EIG; |
1574 | 68 |
21267
f5b8c3aca5f8
make better use of templates for Hessenberg decomposition
John W. Eaton <jwe@octave.org>
parents:
21266
diff
changeset
|
69 template <typename T> class hess; |
1574 | 70 |
21266
e69eaee28737
make better use of templates for Schur decomposition
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
71 template <typename T> class schur; |
1574 | 72 |
460 | 73 class SVD; |
74 class ComplexSVD; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
75 class FloatSVD; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
76 class FloatComplexSVD; |
1574 | 77 |
460 | 78 class LU; |
79 class ComplexLU; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
80 class FloatLU; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
81 class FloatComplexLU; |
1574 | 82 |
460 | 83 class QR; |
84 class ComplexQR; | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
85 class FloatQR; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
86 class FloatComplexQR; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
87 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
88 class QRP; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
89 class ComplexQRP; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
90 class FloatQRP; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
91 class FloatComplexQRP; |
460 | 92 |
93 // Other data types we use but that don't always need to have full | |
94 // declarations. | |
95 | |
1649 | 96 #include "oct-cmplx.h" |
460 | 97 |
98 #ifndef MAPPER_FCN_TYPEDEFS | |
21202
f7121e111991
maint: indent #ifdef blocks in liboctave and src directories.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
99 # define MAPPER_FCN_TYPEDEFS 1 |
460 | 100 |
3248 | 101 typedef bool (*b_d_Mapper)(double); |
102 typedef bool (*b_c_Mapper)(const Complex&); | |
103 | |
460 | 104 typedef double (*d_d_Mapper)(double); |
105 typedef double (*d_c_Mapper)(const Complex&); | |
106 typedef Complex (*c_c_Mapper)(const Complex&); | |
107 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
108 typedef bool (*b_f_Mapper)(float); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
109 typedef bool (*b_fc_Mapper)(const FloatComplex&); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
110 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
111 typedef float (*f_f_Mapper)(float); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
112 typedef float (*f_fc_Mapper)(const FloatComplex&); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
113 typedef FloatComplex (*fc_fc_Mapper)(const FloatComplex&); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
114 |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
115 enum blas_trans_type |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
116 { |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
117 blas_no_trans = 'N', |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
118 blas_trans = 'T', |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
119 blas_conj_trans = 'C' |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
120 }; |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
121 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
122 inline char |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
123 get_blas_char (blas_trans_type transt) |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
124 { |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
125 return static_cast<char> (transt); |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
126 } |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
127 |
21202
f7121e111991
maint: indent #ifdef blocks in liboctave and src directories.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
128 # endif |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
129 |
460 | 130 #endif |