Mercurial > octave
annotate liboctave/operators/mx-defs.h @ 22235:63b41167ef1e
gsvd: new function imported from Octave-Forge linear-algebra package.
* libinterp/corefcn/gsvd.cc: New function to the interpreter. Imported
from the linear-algebra package.
* CmplxGSVD.cc, CmplxGSVD.h, dbleGSVD.cc, dbleGSVD.h: new classes
imported from the linear-algebra package to compute gsvd of Matrix
and ComplexMatrix.
* liboctave/operators/mx-defs.h, liboctave/operators/mx-ext.h: use new
classes.
* libinterp/corefcn/module.mk, liboctave/numeric/module.mk: Add to the
* scripts/help/__unimplemented__.m: Remove "gsvd" from list.
* doc/interpreter/linalg.txi: Add to manual.
build system.
* NEWS: Add function to list of new functions for 4.2.
author | Barbara Locsi <locsi.barbara@gmail.com> |
---|---|
date | Thu, 04 Aug 2016 07:50:31 +0200 |
parents | aba2e6293dd8 |
children | 065a44375723 |
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 |
22235
63b41167ef1e
gsvd: new function imported from Octave-Forge linear-algebra package.
Barbara Locsi <locsi.barbara@gmail.com>
parents:
21724
diff
changeset
|
69 class GSVD; |
63b41167ef1e
gsvd: new function imported from Octave-Forge linear-algebra package.
Barbara Locsi <locsi.barbara@gmail.com>
parents:
21724
diff
changeset
|
70 |
21267
f5b8c3aca5f8
make better use of templates for Hessenberg decomposition
John W. Eaton <jwe@octave.org>
parents:
21266
diff
changeset
|
71 template <typename T> class hess; |
1574 | 72 |
21266
e69eaee28737
make better use of templates for Schur decomposition
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
73 template <typename T> class schur; |
1574 | 74 |
21273
cbced1c09916
better use of templates for svd classes
John W. Eaton <jwe@octave.org>
parents:
21271
diff
changeset
|
75 template <typename T> class svd; |
1574 | 76 |
21271
7e67c7f82fc1
better use of templates for lu factorization classes
John W. Eaton <jwe@octave.org>
parents:
21269
diff
changeset
|
77 template <typename T> class lu; |
1574 | 78 |
21279
eb1524b07fe3
better use of templates for qr classes
John W. Eaton <jwe@octave.org>
parents:
21273
diff
changeset
|
79 template <typename T> class qr; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
80 |
21280
ebdf74c15722
better use of templates for qrp classes
John W. Eaton <jwe@octave.org>
parents:
21279
diff
changeset
|
81 template <typename T> class qrp; |
460 | 82 |
83 // Other data types we use but that don't always need to have full | |
84 // declarations. | |
85 | |
1649 | 86 #include "oct-cmplx.h" |
460 | 87 |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21280
diff
changeset
|
88 #if ! defined (MAPPER_FCN_TYPEDEFS) |
21202
f7121e111991
maint: indent #ifdef blocks in liboctave and src directories.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
89 # define MAPPER_FCN_TYPEDEFS 1 |
460 | 90 |
3248 | 91 typedef bool (*b_d_Mapper)(double); |
92 typedef bool (*b_c_Mapper)(const Complex&); | |
93 | |
460 | 94 typedef double (*d_d_Mapper)(double); |
95 typedef double (*d_c_Mapper)(const Complex&); | |
96 typedef Complex (*c_c_Mapper)(const Complex&); | |
97 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
98 typedef bool (*b_f_Mapper)(float); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
99 typedef bool (*b_fc_Mapper)(const FloatComplex&); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
100 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
101 typedef float (*f_f_Mapper)(float); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
102 typedef float (*f_fc_Mapper)(const FloatComplex&); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
103 typedef FloatComplex (*fc_fc_Mapper)(const FloatComplex&); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
104 |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
105 enum blas_trans_type |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
106 { |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
107 blas_no_trans = 'N', |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
108 blas_trans = 'T', |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
109 blas_conj_trans = 'C' |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
110 }; |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
111 |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
112 inline char |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
113 get_blas_char (blas_trans_type transt) |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
114 { |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
115 return static_cast<char> (transt); |
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 |
21202
f7121e111991
maint: indent #ifdef blocks in liboctave and src directories.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
118 # endif |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
119 |
460 | 120 #endif |