Mercurial > octave
annotate libinterp/octave-value/ov-complex.h @ 29569:29a1f8fd8ee6
move idx_vector classes inside octave namespace
* idx-vector.h, idx-vector.cc:
Move idx_vector classes inside octave namespace. Update all uses
outside of octave namespace to use octave:: tag.
* Sparse.h: Eliminate forward declaration of idx_vector.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 28 Apr 2021 13:46:02 -0400 |
parents | 7854d5752dd2 |
children | 796f54d4ddbf |
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 //////////////////////////////////////////////////////////////////////// |
2376 | 25 |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
20653
diff
changeset
|
26 #if ! defined (octave_ov_complex_h) |
17822
ebb3ef964372
maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents:
17787
diff
changeset
|
27 #define octave_ov_complex_h 1 |
2376 | 28 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21120
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21120
diff
changeset
|
30 |
2376 | 31 #include <cstdlib> |
32 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
33 #include <iosfwd> |
2376 | 34 #include <string> |
35 | |
5110 | 36 #include "lo-ieee.h" |
2376 | 37 #include "mx-base.h" |
38 #include "str-vec.h" | |
39 | |
21100
e39e05d90788
Switch gripe_XXX to either err_XXX or warn_XXX naming scheme.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
40 #include "errwarn.h" |
2376 | 41 #include "error.h" |
42 #include "ov-base.h" | |
4749 | 43 #include "ov-cx-mat.h" |
3223 | 44 #include "ov-base-scalar.h" |
2376 | 45 #include "ov-typeinfo.h" |
46 | |
47 class octave_value_list; | |
48 | |
2477 | 49 // Complex scalar values. |
2376 | 50 |
51 class | |
6693 | 52 OCTINTERP_API |
3223 | 53 octave_complex : public octave_base_scalar<Complex> |
2376 | 54 { |
55 public: | |
56 | |
57 octave_complex (void) | |
3223 | 58 : octave_base_scalar<Complex> () { } |
2376 | 59 |
60 octave_complex (const Complex& c) | |
3223 | 61 : octave_base_scalar<Complex> (c) { } |
2376 | 62 |
63 octave_complex (const octave_complex& c) | |
3223 | 64 : octave_base_scalar<Complex> (c) { } |
2376 | 65 |
22868
87e3163f6c87
use c++11 "= default" syntax for declaration of trivial destructors
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
66 ~octave_complex (void) = default; |
2376 | 67 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
68 octave_base_value * clone (void) const { return new octave_complex (*this); } |
4749 | 69 |
70 // We return an octave_complex_matrix object here instead of an | |
71 // octave_complex object so that in expressions like A(2,2,2) = 2 | |
72 // (for A previously undefined), A will be empty instead of a 1x1 | |
73 // object. | |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
74 octave_base_value * empty_clone (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
75 { return new octave_complex_matrix (); } |
2376 | 76 |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
77 type_conv_info numeric_demotion_function (void) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
78 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
79 octave_base_value * try_narrowing_conversion (void); |
2410 | 80 |
5885 | 81 octave_value do_index_op (const octave_value_list& idx, |
10313 | 82 bool resize_ok = false); |
2376 | 83 |
20653
c16947991354
avoid fixed-size buffers in index exception code
John W. Eaton <jwe@octave.org>
parents:
20542
diff
changeset
|
84 // Use this to give a more specific error message. |
29569
29a1f8fd8ee6
move idx_vector classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
85 octave::idx_vector index_vector (bool /* require_integers */ = false) const; |
14127
b5e819930fd5
Give friendlier error message when indexing with default i or j (bug #35157)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
11586
diff
changeset
|
86 |
5110 | 87 octave_value any (int = 0) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
88 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
89 return (scalar != Complex (0, 0) |
22274
edcad35c364f
don't rely on std:: overloads of arg, conj, imag, and real for real args
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
90 && ! (lo_ieee_isnan (scalar.real ()) |
edcad35c364f
don't rely on std:: overloads of arg, conj, imag, and real for real args
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
91 || lo_ieee_isnan (scalar.imag ()))); |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
92 } |
5110 | 93 |
9685 | 94 builtin_type_t builtin_type (void) const { return btyp_complex; } |
95 | |
2376 | 96 bool is_complex_scalar (void) const { return true; } |
97 | |
23581
c3075ae020e1
maint: Deprecate is_complex_type and replace with iscomplex.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
98 bool iscomplex (void) const { return true; } |
2376 | 99 |
5895 | 100 bool is_double_type (void) const { return true; } |
101 | |
23585
570170b6eb09
maint: Deprecate is_float_type and replace with isfloat.
Rik <rik@octave.org>
parents:
23581
diff
changeset
|
102 bool isfloat (void) const { return true; } |
7576 | 103 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
104 OCTINTERP_API double double_value (bool = false) const; |
2376 | 105 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
106 OCTINTERP_API float float_value (bool = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
107 |
3145 | 108 double scalar_value (bool frc_str_conv = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
109 { return double_value (frc_str_conv); } |
2916 | 110 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
111 float float_scalar_value (bool frc_str_conv = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
112 { return float_value (frc_str_conv); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
113 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
114 OCTINTERP_API Matrix matrix_value (bool = false) const; |
2376 | 115 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
116 OCTINTERP_API FloatMatrix float_matrix_value (bool = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
117 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
118 OCTINTERP_API NDArray array_value (bool = false) const; |
4569 | 119 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
120 OCTINTERP_API FloatNDArray float_array_value (bool = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
121 |
5989 | 122 SparseMatrix sparse_matrix_value (bool = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
123 { return SparseMatrix (matrix_value ()); } |
5989 | 124 |
125 SparseComplexMatrix sparse_complex_matrix_value (bool = false) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
126 { return SparseComplexMatrix (complex_matrix_value ()); } |
5989 | 127 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
128 OCTINTERP_API octave_value |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
129 resize (const dim_vector& dv, bool fill = false) const; |
4915 | 130 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
131 OCTINTERP_API Complex complex_value (bool = false) const; |
2376 | 132 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
133 OCTINTERP_API FloatComplex float_complex_value (bool = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
134 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
135 OCTINTERP_API ComplexMatrix complex_matrix_value (bool = false) const; |
2376 | 136 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
137 OCTINTERP_API FloatComplexMatrix |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
138 float_complex_matrix_value (bool = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
139 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
140 OCTINTERP_API ComplexNDArray complex_array_value (bool = false) const; |
4569 | 141 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
142 OCTINTERP_API FloatComplexNDArray |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
143 float_complex_array_value (bool = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7740
diff
changeset
|
144 |
9853
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
145 bool bool_value (bool warn = false) const |
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
146 { |
21782
2aef506f3fec
use namespace for lo-mappers.h functions
John W. Eaton <jwe@octave.org>
parents:
21739
diff
changeset
|
147 if (octave::math::isnan (scalar)) |
22327
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
148 octave::err_nan_to_logical_conversion (); |
21120
499b851fbfae
Replace pattern if/err_XXX/else/code with if/err_XXX/ code.
Rik <rik@octave.org>
parents:
21100
diff
changeset
|
149 if (warn && scalar != 0.0 && scalar != 1.0) |
21100
e39e05d90788
Switch gripe_XXX to either err_XXX or warn_XXX naming scheme.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
150 warn_logical_conversion (); |
9853
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
151 |
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
152 return scalar != 0.0; |
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
153 } |
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
154 |
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
155 boolNDArray bool_array_value (bool warn = false) const |
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
156 { |
21782
2aef506f3fec
use namespace for lo-mappers.h functions
John W. Eaton <jwe@octave.org>
parents:
21739
diff
changeset
|
157 if (octave::math::isnan (scalar)) |
22327
d0562b3159c7
move more classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
22323
diff
changeset
|
158 octave::err_nan_to_logical_conversion (); |
21120
499b851fbfae
Replace pattern if/err_XXX/else/code with if/err_XXX/ code.
Rik <rik@octave.org>
parents:
21100
diff
changeset
|
159 if (warn && scalar != 0.0 && scalar != 1.0) |
21100
e39e05d90788
Switch gripe_XXX to either err_XXX or warn_XXX naming scheme.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
160 warn_logical_conversion (); |
9853
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
161 |
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
162 return boolNDArray (dim_vector (1, 1), scalar != 0.0); |
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
163 } |
8d9e4752441a
implement complex built-in logical conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
164 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
165 OCTINTERP_API octave_value as_double (void) const; |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
166 OCTINTERP_API octave_value as_single (void) const; |
22296
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22274
diff
changeset
|
167 |
26919
c33ac5ca0a7a
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26399
diff
changeset
|
168 // We don't need to override both forms of the diag method. The using |
c33ac5ca0a7a
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26399
diff
changeset
|
169 // declaration will avoid warnings about partially-overloaded virtual |
c33ac5ca0a7a
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26399
diff
changeset
|
170 // functions. |
c33ac5ca0a7a
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26399
diff
changeset
|
171 using octave_base_scalar<Complex>::diag; |
c33ac5ca0a7a
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26399
diff
changeset
|
172 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
173 OCTINTERP_API octave_value diag (octave_idx_type m, octave_idx_type n) const; |
14557
e8e86ae3abbc
make diag (x, m, n) return a proper diagonal matrix object (bug #36099)
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
174 |
2376 | 175 void increment (void) { scalar += 1.0; } |
176 | |
177 void decrement (void) { scalar -= 1.0; } | |
178 | |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
179 OCTINTERP_API bool save_ascii (std::ostream& os); |
4687 | 180 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
181 OCTINTERP_API bool load_ascii (std::istream& is); |
4687 | 182 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
183 OCTINTERP_API bool save_binary (std::ostream& os, bool save_as_floats); |
4687 | 184 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
185 OCTINTERP_API bool |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
186 load_binary (std::istream& is, bool swap, |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
187 octave::mach_info::float_format fmt); |
4687 | 188 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
189 OCTINTERP_API bool |
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
190 save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats); |
4687 | 191 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
192 OCTINTERP_API bool load_hdf5 (octave_hdf5_id loc_id, const char *name); |
4687 | 193 |
23059
b98ebcd7f11c
move some octave stream classes into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
194 int write (octave::stream& os, int block_size, |
10313 | 195 oct_data_conv::data_type output_type, int skip, |
21739
c4ab2e54f100
use namespace for oct_mach_info class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
196 octave::mach_info::float_format flt_fmt) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
197 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
198 // Yes, for compatibility, we drop the imaginary part here. |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
199 return os.write (array_value (true), block_size, output_type, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
200 skip, flt_fmt); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
201 } |
4944 | 202 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
203 OCTINTERP_API mxArray * as_mxArray (bool interleaved) const; |
5900 | 204 |
29234
853e60367cb6
Set API tags in files in libinterp/octave-value (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28126
diff
changeset
|
205 OCTINTERP_API octave_value map (unary_mapper_t umap) const; |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
206 |
2376 | 207 private: |
208 | |
4612 | 209 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA |
2376 | 210 }; |
211 | |
4953 | 212 typedef octave_complex octave_complex_scalar; |
213 | |
2376 | 214 #endif |