Mercurial > octave
annotate libinterp/octave-value/ov.h @ 28900:f8efd03a553e
maint: merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 13 Oct 2020 20:08:05 +0200 |
parents | 43ad651cf5a0 02f0649f43d7 |
children | 853e60367cb6 |
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 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
3 // Copyright (C) 1996-2020 The Octave Project Developers |
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:
20768
diff
changeset
|
26 #if ! defined (octave_ov_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_h 1 |
2376 | 28 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21139
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21139
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> |
4219 | 35 #include <list> |
23678
dcba41788495
new struct/map constructors
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
36 #include <map> |
2376 | 37 |
38 #include "Range.h" | |
5828 | 39 #include "data-conv.h" |
2376 | 40 #include "idx-vector.h" |
5828 | 41 #include "mach-info.h" |
2376 | 42 #include "mx-base.h" |
23059
b98ebcd7f11c
move some octave stream classes into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
43 #include "oct-sort.h" |
4254 | 44 #include "oct-time.h" |
2942 | 45 #include "str-vec.h" |
46 | |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
47 namespace octave |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
48 { |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
49 class type_info; |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
50 } |
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
51 |
3351 | 52 class Cell; |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24643
diff
changeset
|
53 class float_format; |
15149
62a35ae7d6a2
use forward decls for mxArray in ov.h and ov-base.h
John W. Eaton <jwe@octave.org>
parents:
15140
diff
changeset
|
54 class mxArray; |
10742
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
55 class octave_map; |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
56 class octave_scalar_map; |
2974 | 57 class octave_function; |
4700 | 58 class octave_user_function; |
4342 | 59 class octave_fcn_handle; |
2376 | 60 class octave_value_list; |
61 | |
28123
4963f23b145c
move mex type definitions to separate file
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
62 #include "mxtypes.h" |
4963f23b145c
move mex type definitions to separate file
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
63 |
23059
b98ebcd7f11c
move some octave stream classes into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
64 #include "oct-stream.h" |
5759 | 65 #include "ov-base.h" |
2376 | 66 |
67 class | |
6109 | 68 OCTINTERP_API |
2974 | 69 octave_value |
2376 | 70 { |
71 public: | |
72 | |
3203 | 73 enum unary_op |
74 { | |
6518 | 75 op_not, // not |
76 op_uplus, // uplus | |
77 op_uminus, // uminus | |
78 op_transpose, // transpose | |
79 op_hermitian, // ctranspose | |
3525 | 80 op_incr, |
81 op_decr, | |
3203 | 82 num_unary_ops, |
83 unknown_unary_op | |
84 }; | |
85 | |
2376 | 86 enum binary_op |
87 { | |
6518 | 88 op_add, // plus |
89 op_sub, // minus | |
90 op_mul, // mtimes | |
91 op_div, // mrdivide | |
92 op_pow, // mpower | |
93 op_ldiv, // mldivide | |
94 op_lt, // lt | |
95 op_le, // le | |
96 op_eq, // eq | |
97 op_ge, // ge | |
98 op_gt, // gt | |
99 op_ne, // ne | |
100 op_el_mul, // times | |
101 op_el_div, // rdivide | |
102 op_el_pow, // power | |
103 op_el_ldiv, // ldivide | |
104 op_el_and, // and | |
105 op_el_or, // or | |
3525 | 106 op_struct_ref, |
2376 | 107 num_binary_ops, |
108 unknown_binary_op | |
109 }; | |
110 | |
7800
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
111 enum compound_binary_op |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
112 { |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
113 // ** compound operations ** |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
114 op_trans_mul, |
7800
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
115 op_mul_trans, |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
116 op_herm_mul, |
7800
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
117 op_mul_herm, |
9661
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
9657
diff
changeset
|
118 op_trans_ldiv, |
afcf852256d2
optimize / and '\ for triangular matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
9657
diff
changeset
|
119 op_herm_ldiv, |
8982
dc6bda6f9994
implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8960
diff
changeset
|
120 op_el_not_and, |
dc6bda6f9994
implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8960
diff
changeset
|
121 op_el_not_or, |
dc6bda6f9994
implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8960
diff
changeset
|
122 op_el_and_not, |
dc6bda6f9994
implement compound logical ops
Jaroslav Hajek <highegg@gmail.com>
parents:
8960
diff
changeset
|
123 op_el_or_not, |
7800
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
124 num_compound_binary_ops, |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
125 unknown_compound_binary_op |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
126 }; |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
127 |
2880 | 128 enum assign_op |
129 { | |
3525 | 130 op_asn_eq, |
131 op_add_eq, | |
132 op_sub_eq, | |
133 op_mul_eq, | |
134 op_div_eq, | |
135 op_ldiv_eq, | |
4018 | 136 op_pow_eq, |
3525 | 137 op_el_mul_eq, |
138 op_el_div_eq, | |
139 op_el_ldiv_eq, | |
4018 | 140 op_el_pow_eq, |
3525 | 141 op_el_and_eq, |
142 op_el_or_eq, | |
2880 | 143 num_assign_ops, |
144 unknown_assign_op | |
145 }; | |
146 | |
15140
6ea86e1d0f5f
Support +=, -=, *=, ect. in JIT
Max Brister <max@2bass.com>
parents:
15057
diff
changeset
|
147 static binary_op assign_op_to_binary_op (assign_op); |
6ea86e1d0f5f
Support +=, -=, *=, ect. in JIT
Max Brister <max@2bass.com>
parents:
15057
diff
changeset
|
148 |
9607
1be3c73ed7b5
reuse temporary arrays in nested expressions
Jaroslav Hajek <highegg@gmail.com>
parents:
9521
diff
changeset
|
149 static assign_op binary_op_to_assign_op (binary_op); |
1be3c73ed7b5
reuse temporary arrays in nested expressions
Jaroslav Hajek <highegg@gmail.com>
parents:
9521
diff
changeset
|
150 |
3523 | 151 static std::string unary_op_as_string (unary_op); |
7336 | 152 static std::string unary_op_fcn_name (unary_op); |
3203 | 153 |
3523 | 154 static std::string binary_op_as_string (binary_op); |
7336 | 155 static std::string binary_op_fcn_name (binary_op); |
2376 | 156 |
7800
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
157 static std::string binary_op_fcn_name (compound_binary_op); |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
158 |
3523 | 159 static std::string assign_op_as_string (assign_op); |
2880 | 160 |
3933 | 161 static octave_value empty_conv (const std::string& type, |
10313 | 162 const octave_value& rhs = octave_value ()); |
3933 | 163 |
2376 | 164 enum magic_colon { magic_colon_t }; |
165 | |
8992
d12f44a5dce3
implement fast octave_value constructor
Jaroslav Hajek <highegg@gmail.com>
parents:
8982
diff
changeset
|
166 octave_value (void) |
21573
f3f8e1d3e399
avoid mulitple definitions of static function-scope vars (bug #47372)
John W. Eaton <jwe@octave.org>
parents:
20087
diff
changeset
|
167 : rep (nil_rep ()) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
168 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
169 rep->count++; |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
170 } |
8992
d12f44a5dce3
implement fast octave_value constructor
Jaroslav Hajek <highegg@gmail.com>
parents:
8982
diff
changeset
|
171 |
4254 | 172 octave_value (short int i); |
173 octave_value (unsigned short int i); | |
4233 | 174 octave_value (int i); |
4254 | 175 octave_value (unsigned int i); |
176 octave_value (long int i); | |
177 octave_value (unsigned long int i); | |
4353 | 178 |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
179 // FIXME: These are kluges. They turn into doubles internally, which will |
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
180 // break for very large values. We just use them to store things like |
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
181 // 64-bit ino_t, etc, and hope that those values are never actually larger |
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
182 // than can be represented exactly in a double. |
4353 | 183 |
21354
06d15e4e611a
move public data type macros to octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21294
diff
changeset
|
184 #if defined (OCTAVE_HAVE_LONG_LONG_INT) |
4353 | 185 octave_value (long long int i); |
186 #endif | |
21354
06d15e4e611a
move public data type macros to octave-config.h
John W. Eaton <jwe@octave.org>
parents:
21294
diff
changeset
|
187 #if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT) |
4353 | 188 octave_value (unsigned long long int i); |
189 #endif | |
190 | |
21730
30c53770f47e
use namespace for system time classes
John W. Eaton <jwe@octave.org>
parents:
21574
diff
changeset
|
191 octave_value (octave::sys::time t); |
2376 | 192 octave_value (double d); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
193 octave_value (float d); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
194 octave_value (const Array<octave_value>& a, bool is_cs_list = false); |
4532 | 195 octave_value (const Cell& c, bool is_cs_list = false); |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14770
diff
changeset
|
196 octave_value (const Matrix& m, const MatrixType& t = MatrixType ()); |
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14770
diff
changeset
|
197 octave_value (const FloatMatrix& m, const MatrixType& t = MatrixType ()); |
4513 | 198 octave_value (const NDArray& nda); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
199 octave_value (const FloatNDArray& nda); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
200 octave_value (const Array<double>& m); |
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
201 octave_value (const Array<float>& m); |
2376 | 202 octave_value (const DiagMatrix& d); |
15428
fd5c0159b588
Fix diag handling of diagvectors (bug #37411)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14138
diff
changeset
|
203 octave_value (const DiagArray2<double>& d); |
fd5c0159b588
Fix diag handling of diagvectors (bug #37411)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14138
diff
changeset
|
204 octave_value (const DiagArray2<float>& d); |
fd5c0159b588
Fix diag handling of diagvectors (bug #37411)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14138
diff
changeset
|
205 octave_value (const DiagArray2<Complex>& d); |
fd5c0159b588
Fix diag handling of diagvectors (bug #37411)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14138
diff
changeset
|
206 octave_value (const DiagArray2<FloatComplex>& d); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
207 octave_value (const FloatDiagMatrix& d); |
3418 | 208 octave_value (const RowVector& v); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
209 octave_value (const FloatRowVector& v); |
3418 | 210 octave_value (const ColumnVector& v); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
211 octave_value (const FloatColumnVector& v); |
2376 | 212 octave_value (const Complex& C); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
213 octave_value (const FloatComplex& C); |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14770
diff
changeset
|
214 octave_value (const ComplexMatrix& m, const MatrixType& t = MatrixType ()); |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
215 octave_value (const FloatComplexMatrix& m, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
216 const MatrixType& t = MatrixType ()); |
4513 | 217 octave_value (const ComplexNDArray& cnda); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
218 octave_value (const FloatComplexNDArray& cnda); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
219 octave_value (const Array<Complex>& m); |
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
220 octave_value (const Array<FloatComplex>& m); |
2376 | 221 octave_value (const ComplexDiagMatrix& d); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
222 octave_value (const FloatComplexDiagMatrix& d); |
3418 | 223 octave_value (const ComplexRowVector& v); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
224 octave_value (const FloatComplexRowVector& v); |
3418 | 225 octave_value (const ComplexColumnVector& v); |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
226 octave_value (const FloatComplexColumnVector& v); |
8960
93f18f166aba
remove float perm matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
227 octave_value (const PermMatrix& p); |
2825 | 228 octave_value (bool b); |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14770
diff
changeset
|
229 octave_value (const boolMatrix& bm, const MatrixType& t = MatrixType ()); |
4513 | 230 octave_value (const boolNDArray& bnda); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
231 octave_value (const Array<bool>& bnda); |
9689
34d6f005db4b
eliminate is_string argument from octave_value character array constructors
John W. Eaton <jwe@octave.org>
parents:
9685
diff
changeset
|
232 octave_value (char c, char type = '\''); |
34d6f005db4b
eliminate is_string argument from octave_value character array constructors
John W. Eaton <jwe@octave.org>
parents:
9685
diff
changeset
|
233 octave_value (const char *s, char type = '\''); |
34d6f005db4b
eliminate is_string argument from octave_value character array constructors
John W. Eaton <jwe@octave.org>
parents:
9685
diff
changeset
|
234 octave_value (const std::string& s, char type = '\''); |
34d6f005db4b
eliminate is_string argument from octave_value character array constructors
John W. Eaton <jwe@octave.org>
parents:
9685
diff
changeset
|
235 octave_value (const string_vector& s, char type = '\''); |
10313 | 236 octave_value (const charMatrix& chm, char type = '\''); |
9689
34d6f005db4b
eliminate is_string argument from octave_value character array constructors
John W. Eaton <jwe@octave.org>
parents:
9685
diff
changeset
|
237 octave_value (const charNDArray& chnda, char type = '\''); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
238 octave_value (const Array<char>& chnda, char type = '\''); |
21134
2e5c1f766ac9
provide replacement hints for deprecated C++ functions
John W. Eaton <jwe@octave.org>
parents:
21076
diff
changeset
|
239 |
5785 | 240 octave_value (const SparseMatrix& m, const MatrixType& t = MatrixType ()); |
6863 | 241 octave_value (const Sparse<double>& m, const MatrixType& t = MatrixType ()); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
242 octave_value (const SparseComplexMatrix& m, |
10313 | 243 const MatrixType& t = MatrixType ()); |
6863 | 244 octave_value (const Sparse<Complex>& m, const MatrixType& t = MatrixType ()); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
245 octave_value (const SparseBoolMatrix& bm, |
10313 | 246 const MatrixType& t = MatrixType ()); |
7433 | 247 octave_value (const Sparse<bool>& m, const MatrixType& t = MatrixType ()); |
4901 | 248 octave_value (const octave_int8& i); |
4910 | 249 octave_value (const octave_int16& i); |
250 octave_value (const octave_int32& i); | |
251 octave_value (const octave_int64& i); | |
4901 | 252 octave_value (const octave_uint8& i); |
253 octave_value (const octave_uint16& i); | |
254 octave_value (const octave_uint32& i); | |
255 octave_value (const octave_uint64& i); | |
256 octave_value (const int8NDArray& inda); | |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
257 octave_value (const Array<octave_int8>& inda); |
4910 | 258 octave_value (const int16NDArray& inda); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
259 octave_value (const Array<octave_int16>& inda); |
4910 | 260 octave_value (const int32NDArray& inda); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
261 octave_value (const Array<octave_int32>& inda); |
4910 | 262 octave_value (const int64NDArray& inda); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
263 octave_value (const Array<octave_int64>& inda); |
4901 | 264 octave_value (const uint8NDArray& inda); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
265 octave_value (const Array<octave_uint8>& inda); |
4901 | 266 octave_value (const uint16NDArray& inda); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
267 octave_value (const Array<octave_uint16>& inda); |
4901 | 268 octave_value (const uint32NDArray& inda); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
269 octave_value (const Array<octave_uint32>& inda); |
4901 | 270 octave_value (const uint64NDArray& inda); |
9732
b4fdfee405b5
remove ArrayN<T> + fix nonhom. diag-scalar ops
Jaroslav Hajek <highegg@gmail.com>
parents:
9728
diff
changeset
|
271 octave_value (const Array<octave_uint64>& inda); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
272 octave_value (const Array<octave_idx_type>& inda, |
9351
e2344f4af0cb
autocache indices returned from find et al.
Jaroslav Hajek <highegg@gmail.com>
parents:
9329
diff
changeset
|
273 bool zero_based = false, bool cache_index = false); |
9725 | 274 octave_value (const Array<std::string>& cellstr); |
10325
8b3cfc1288e2
implement lazy index conversions
Jaroslav Hajek <highegg@gmail.com>
parents:
10313
diff
changeset
|
275 octave_value (const idx_vector& idx, bool lazy = true); |
28638
98192ec1621f
replace Range with range<double>
John W. Eaton <jwe@octave.org>
parents:
28633
diff
changeset
|
276 OCTAVE_DEPRECATED (7, "use 'octave_value (range<double>&)' instead") |
2376 | 277 octave_value (double base, double limit, double inc); |
28638
98192ec1621f
replace Range with range<double>
John W. Eaton <jwe@octave.org>
parents:
28633
diff
changeset
|
278 OCTAVE_DEPRECATED (7, "use 'octave_value (range<double>&)' instead") |
19394
b39cbe9f3bb0
allow ranges to be disabled
John W. Eaton <jwe@octave.org>
parents:
19110
diff
changeset
|
279 octave_value (const Range& r, bool force_range = false); |
28639
7ebe185e3818
new octave_value constructors for integer and float ranges.
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
280 octave_value (const octave::range<char>& r, char type, bool force_range = false); |
7ebe185e3818
new octave_value constructors for integer and float ranges.
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
281 octave_value (const octave::range<float>& r, bool force_range = false); |
28638
98192ec1621f
replace Range with range<double>
John W. Eaton <jwe@octave.org>
parents:
28633
diff
changeset
|
282 octave_value (const octave::range<double>& r, bool force_range = false); |
28639
7ebe185e3818
new octave_value constructors for integer and float ranges.
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
283 octave_value (const octave::range<octave_int8>& r, bool force_range = false); |
7ebe185e3818
new octave_value constructors for integer and float ranges.
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
284 octave_value (const octave::range<octave_int16>& r, bool force_range = false); |
7ebe185e3818
new octave_value constructors for integer and float ranges.
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
285 octave_value (const octave::range<octave_int32>& r, bool force_range = false); |
7ebe185e3818
new octave_value constructors for integer and float ranges.
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
286 octave_value (const octave::range<octave_int64>& r, bool force_range = false); |
7ebe185e3818
new octave_value constructors for integer and float ranges.
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
287 octave_value (const octave::range<octave_uint8>& r, bool force_range = false); |
7ebe185e3818
new octave_value constructors for integer and float ranges.
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
288 octave_value (const octave::range<octave_uint16>& r, bool force_range = false); |
7ebe185e3818
new octave_value constructors for integer and float ranges.
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
289 octave_value (const octave::range<octave_uint32>& r, bool force_range = false); |
7ebe185e3818
new octave_value constructors for integer and float ranges.
John W. Eaton <jwe@octave.org>
parents:
28638
diff
changeset
|
290 octave_value (const octave::range<octave_uint64>& r, bool force_range = false); |
10742
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
291 octave_value (const octave_map& m); |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
292 octave_value (const octave_scalar_map& m); |
23678
dcba41788495
new struct/map constructors
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
293 octave_value (const std::map<std::string, octave_value>&); |
18402
4c064d3d2750
Remove Octave_map class deprecated in 3.8.
Rik <rik@octave.org>
parents:
18130
diff
changeset
|
294 octave_value (const octave_map& m, const std::string& id, |
4c064d3d2750
Remove Octave_map class deprecated in 3.8.
Rik <rik@octave.org>
parents:
18130
diff
changeset
|
295 const std::list<std::string>& plist); |
4c064d3d2750
Remove Octave_map class deprecated in 3.8.
Rik <rik@octave.org>
parents:
18130
diff
changeset
|
296 octave_value (const octave_scalar_map& m, const std::string& id, |
13874
c1b754d93572
copy parent class info when performing operations on class objects
John W. Eaton <jwe@octave.org>
parents:
13736
diff
changeset
|
297 const std::list<std::string>& plist); |
23352
778fdffc09df
deprecate "octave_value (octave_value_list, bool)" constructor
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
298 |
23913
062ce545b21e
mark octave_value from octave_value_list constructor explicit
John W. Eaton <jwe@octave.org>
parents:
23881
diff
changeset
|
299 // This one is explicit because it can cause some trouble to |
062ce545b21e
mark octave_value from octave_value_list constructor explicit
John W. Eaton <jwe@octave.org>
parents:
23881
diff
changeset
|
300 // accidentally create a cs-list when one was not intended. |
062ce545b21e
mark octave_value from octave_value_list constructor explicit
John W. Eaton <jwe@octave.org>
parents:
23881
diff
changeset
|
301 explicit octave_value (const octave_value_list& m); |
23352
778fdffc09df
deprecate "octave_value (octave_value_list, bool)" constructor
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
302 |
2376 | 303 octave_value (octave_value::magic_colon); |
304 | |
9728
70925b11ba46
again allow the obsolete syntax for cellfun
Jaroslav Hajek <highegg@gmail.com>
parents:
9725
diff
changeset
|
305 octave_value (octave_base_value *new_rep, bool borrow = false); |
21134
2e5c1f766ac9
provide replacement hints for deprecated C++ functions
John W. Eaton <jwe@octave.org>
parents:
21076
diff
changeset
|
306 |
2376 | 307 // Copy constructor. |
308 | |
309 octave_value (const octave_value& a) | |
27352
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
310 : rep (a.rep) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
311 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
312 rep->count++; |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
313 } |
2376 | 314 |
27352
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
315 octave_value (octave_value&& a) |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
316 : rep (a.rep) |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
317 { |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
318 a.rep = nullptr; |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
319 } |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
320 |
3933 | 321 // This should only be called for derived types. |
322 | |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
323 octave_base_value * clone (void) const; |
3933 | 324 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
325 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
|
326 { return rep->empty_clone (); } |
3933 | 327 |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
328 // Delete the representation of this constant if the count drops to zero. |
2376 | 329 |
6338 | 330 ~octave_value (void) |
331 { | |
27352
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
332 // Because we define a move constructor and a move assignment |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
333 // operator, rep may be a nullptr here. We should only need to |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
334 // protect the move assignment operator in a similar way. |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
335 |
28899
02f0649f43d7
Avoid deleting objects that live on the stack.
Markus Mützel <markus.muetzel@gmx.de>
parents:
28427
diff
changeset
|
336 if (rep && --rep->count == 0 && rep != nil_rep ()) |
6338 | 337 delete rep; |
338 } | |
2376 | 339 |
340 void make_unique (void) | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
341 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
342 if (rep->count > 1) |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
343 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
344 octave_base_value *r = rep->unique_clone (); |
13985
43cc49c7abd1
Use thread-safe atomic reference counting (GCC and MSVC).
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13874
diff
changeset
|
345 |
28899
02f0649f43d7
Avoid deleting objects that live on the stack.
Markus Mützel <markus.muetzel@gmx.de>
parents:
28427
diff
changeset
|
346 if (--rep->count == 0 && rep != nil_rep ()) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
347 delete rep; |
13985
43cc49c7abd1
Use thread-safe atomic reference counting (GCC and MSVC).
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13874
diff
changeset
|
348 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
349 rep = r; |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
350 } |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
351 } |
2376 | 352 |
8546
3d8a914c580e
improve parser indexed assigment code
Jaroslav Hajek <highegg@gmail.com>
parents:
8531
diff
changeset
|
353 // This uniquifies the value if it is referenced by more than a certain |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
354 // number of shallow copies. This is useful for optimizations where we |
8546
3d8a914c580e
improve parser indexed assigment code
Jaroslav Hajek <highegg@gmail.com>
parents:
8531
diff
changeset
|
355 // know a certain copy, typically within a cell array, to be obsolete. |
3d8a914c580e
improve parser indexed assigment code
Jaroslav Hajek <highegg@gmail.com>
parents:
8531
diff
changeset
|
356 void make_unique (int obsolete_copies) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
357 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
358 if (rep->count > obsolete_copies + 1) |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
359 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
360 octave_base_value *r = rep->unique_clone (); |
13985
43cc49c7abd1
Use thread-safe atomic reference counting (GCC and MSVC).
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13874
diff
changeset
|
361 |
28899
02f0649f43d7
Avoid deleting objects that live on the stack.
Markus Mützel <markus.muetzel@gmx.de>
parents:
28427
diff
changeset
|
362 if (--rep->count == 0 && rep != nil_rep ()) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
363 delete rep; |
13985
43cc49c7abd1
Use thread-safe atomic reference counting (GCC and MSVC).
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13874
diff
changeset
|
364 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
365 rep = r; |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
366 } |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
367 } |
8546
3d8a914c580e
improve parser indexed assigment code
Jaroslav Hajek <highegg@gmail.com>
parents:
8531
diff
changeset
|
368 |
2376 | 369 // Simple assignment. |
370 | |
371 octave_value& operator = (const octave_value& a) | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
372 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
373 if (rep != a.rep) |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
374 { |
28899
02f0649f43d7
Avoid deleting objects that live on the stack.
Markus Mützel <markus.muetzel@gmx.de>
parents:
28427
diff
changeset
|
375 if (--rep->count == 0 && rep != nil_rep ()) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
376 delete rep; |
2376 | 377 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
378 rep = a.rep; |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
379 rep->count++; |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
380 } |
2376 | 381 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
382 return *this; |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
383 } |
2376 | 384 |
27352
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
385 octave_value& operator = (octave_value&& a) |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
386 { |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
387 // Because we define a move constructor and a move assignment |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
388 // operator, rep may be a nullptr here. We should only need to |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
389 // protect the destructor in a similar way. |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
390 |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
391 if (this != &a) |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
392 { |
28899
02f0649f43d7
Avoid deleting objects that live on the stack.
Markus Mützel <markus.muetzel@gmx.de>
parents:
28427
diff
changeset
|
393 if (rep && --rep->count == 0 && rep != nil_rep ()) |
27352
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
394 delete rep; |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
395 |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
396 rep = a.rep; |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
397 a.rep = nullptr; |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
398 } |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
399 |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
400 return *this; |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
401 } |
7335ebd4c798
define some move constructors and assignment operators
John W. Eaton <jwe@octave.org>
parents:
27216
diff
changeset
|
402 |
9703
9a5598cf899d
octave_value::get_count: return octave_idx_type, not int
John W. Eaton <jwe@octave.org>
parents:
9689
diff
changeset
|
403 octave_idx_type get_count (void) const { return rep->count; } |
3239 | 404 |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
405 octave_base_value::type_conv_info numeric_conversion_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
406 { return rep->numeric_conversion_function (); } |
2376 | 407 |
8345
c777f3ce02d8
smarter conversion lookup
Jaroslav Hajek <highegg@gmail.com>
parents:
8150
diff
changeset
|
408 octave_base_value::type_conv_info numeric_demotion_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
409 { return rep->numeric_demotion_function (); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
410 |
2409 | 411 void maybe_mutate (void); |
412 | |
5759 | 413 octave_value squeeze (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
414 { return rep->squeeze (); } |
4532 | 415 |
8458
d254a21e0120
reimplement full as method of octave_base_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8456
diff
changeset
|
416 // The result of full(). |
d254a21e0120
reimplement full as method of octave_base_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8456
diff
changeset
|
417 octave_value full_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
418 { return rep->full_value (); } |
8458
d254a21e0120
reimplement full as method of octave_base_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8456
diff
changeset
|
419 |
22283
564203123065
move single and double type conversion functions to ov.cc
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
420 // Type conversions. |
564203123065
move single and double type conversion functions to ov.cc
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
421 |
22296
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
422 octave_value as_double (void) const { return rep->as_double (); } |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
423 octave_value as_single (void) const { return rep->as_single (); } |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
424 |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
425 octave_value as_int8 (void) const { return rep->as_int8 (); } |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
426 octave_value as_int16 (void) const { return rep->as_int16 (); } |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
427 octave_value as_int32 (void) const { return rep->as_int32 (); } |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
428 octave_value as_int64 (void) const { return rep->as_int64 (); } |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
429 |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
430 octave_value as_uint8 (void) const { return rep->as_uint8 (); } |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
431 octave_value as_uint16 (void) const { return rep->as_uint16 (); } |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
432 octave_value as_uint32 (void) const { return rep->as_uint32 (); } |
8b18f46f6427
revamp double, single, int type conversions
John W. Eaton <jwe@octave.org>
parents:
22283
diff
changeset
|
433 octave_value as_uint64 (void) const { return rep->as_uint64 (); } |
22283
564203123065
move single and double type conversion functions to ov.cc
John W. Eaton <jwe@octave.org>
parents:
22197
diff
changeset
|
434 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
435 octave_base_value * try_narrowing_conversion (void) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
436 { return rep->try_narrowing_conversion (); } |
2409 | 437 |
9329
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9151
diff
changeset
|
438 // Close to dims (), but can be overloaded for classes. |
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9151
diff
changeset
|
439 Matrix size (void) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
440 { return rep->size (); } |
9329
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9151
diff
changeset
|
441 |
26922
072d0610cc56
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26916
diff
changeset
|
442 // FIXME: should this function be deprecated and removed? It supports |
072d0610cc56
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26916
diff
changeset
|
443 // an undocumented feature of Matlab. |
072d0610cc56
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26916
diff
changeset
|
444 octave_idx_type xnumel (const octave_value_list& idx) |
072d0610cc56
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26916
diff
changeset
|
445 { return rep->xnumel (idx); } |
9329
67fc970dad7d
improve indexed assignment using indexed numel
Jaroslav Hajek <highegg@gmail.com>
parents:
9151
diff
changeset
|
446 |
26916
9cd4b045fe3d
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26655
diff
changeset
|
447 // FIXME: Do we really need all these different versions of subsref |
9cd4b045fe3d
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26655
diff
changeset
|
448 // and related functions? |
9cd4b045fe3d
avoid some overloaded virtual warnings (bug #55741)
John W. Eaton <jwe@octave.org>
parents:
26655
diff
changeset
|
449 |
4271 | 450 octave_value single_subsref (const std::string& type, |
10313 | 451 const octave_value_list& idx); |
4271 | 452 |
5759 | 453 octave_value subsref (const std::string& type, |
8551
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
454 const std::list<octave_value_list>& idx) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
455 { return rep->subsref (type, idx); } |
3933 | 456 |
8551
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
457 octave_value subsref (const std::string& type, |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
458 const std::list<octave_value_list>& idx, |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
459 bool auto_add) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
460 { return rep->subsref (type, idx, auto_add); } |
8551
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
461 |
5759 | 462 octave_value_list subsref (const std::string& type, |
8551
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
463 const std::list<octave_value_list>& idx, |
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
464 int nargout); |
3933 | 465 |
4247 | 466 octave_value next_subsref (const std::string& type, const |
10313 | 467 std::list<octave_value_list>& idx, |
468 size_t skip = 1); | |
3933 | 469 |
4994 | 470 octave_value_list next_subsref (int nargout, |
10313 | 471 const std::string& type, const |
472 std::list<octave_value_list>& idx, | |
473 size_t skip = 1); | |
4994 | 474 |
8551
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
475 octave_value next_subsref (bool auto_add, const std::string& type, const |
10313 | 476 std::list<octave_value_list>& idx, |
477 size_t skip = 1); | |
8551
906f976d35a8
further improve struct&cell indexing & indexed assignment
Jaroslav Hajek <highegg@gmail.com>
parents:
8546
diff
changeset
|
478 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
479 octave_value index_op (const octave_value_list& idx, bool resize_ok = false) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
480 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
481 return rep->do_index_op (idx, resize_ok); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
482 } |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
483 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
484 OCTAVE_DEPRECATED (7, "use 'octave_value::index_op' instead") |
5759 | 485 octave_value do_index_op (const octave_value_list& idx, |
10313 | 486 bool resize_ok = false) |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
487 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
488 return index_op (idx, resize_ok); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
489 } |
3933 | 490 |
5759 | 491 octave_value subsasgn (const std::string& type, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
492 const std::list<octave_value_list>& idx, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
493 const octave_value& rhs); |
2376 | 494 |
12171
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
11586
diff
changeset
|
495 octave_value undef_subsasgn (const std::string& type, |
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
11586
diff
changeset
|
496 const std::list<octave_value_list>& idx, |
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
11586
diff
changeset
|
497 const octave_value& rhs); |
d08901c05c1b
fix bug in class assignment to undefined object with index
John W. Eaton <jwe@octave.org>
parents:
11586
diff
changeset
|
498 |
10544
9961fc022d9d
fix assignment to non-existing variables and octave_value::assign
Jaroslav Hajek <highegg@gmail.com>
parents:
10521
diff
changeset
|
499 octave_value& assign (assign_op op, const std::string& type, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
500 const std::list<octave_value_list>& idx, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
501 const octave_value& rhs); |
2948 | 502 |
10544
9961fc022d9d
fix assignment to non-existing variables and octave_value::assign
Jaroslav Hajek <highegg@gmail.com>
parents:
10521
diff
changeset
|
503 octave_value& assign (assign_op, const octave_value& rhs); |
2948 | 504 |
18130
e473c4853afc
enable non-integer ranges as indices by default and deprecate preference
John W. Eaton <jwe@octave.org>
parents:
17870
diff
changeset
|
505 idx_vector index_vector (bool require_integers = false) const |
e473c4853afc
enable non-integer ranges as indices by default and deprecate preference
John W. Eaton <jwe@octave.org>
parents:
17870
diff
changeset
|
506 { |
e473c4853afc
enable non-integer ranges as indices by default and deprecate preference
John W. Eaton <jwe@octave.org>
parents:
17870
diff
changeset
|
507 return rep->index_vector (require_integers); |
e473c4853afc
enable non-integer ranges as indices by default and deprecate preference
John W. Eaton <jwe@octave.org>
parents:
17870
diff
changeset
|
508 } |
2376 | 509 |
510 // Size. | |
511 | |
26078
0549d088f50e
move get_dims_str from variables.cc to octave_value class
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
512 dim_vector dims (void) const { return rep->dims (); } |
0549d088f50e
move get_dims_str from variables.cc to octave_value class
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
513 |
0549d088f50e
move get_dims_str from variables.cc to octave_value class
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
514 std::string get_dims_str (void) const; |
4513 | 515 |
5759 | 516 octave_idx_type rows (void) const { return rep->rows (); } |
4563 | 517 |
5759 | 518 octave_idx_type columns (void) const { return rep->columns (); } |
3195 | 519 |
5275 | 520 octave_idx_type length (void) const; |
4554 | 521 |
5759 | 522 int ndims (void) const { return rep->ndims (); } |
4563 | 523 |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14770
diff
changeset
|
524 bool all_zero_dims (void) const { return dims ().all_zero (); } |
5164 | 525 |
23590
eb3c7abad98f
ov.h: Directly call replacement functions from deprecated functions.
Rik <rik@octave.org>
parents:
23589
diff
changeset
|
526 // Are the dimensions of this constant zero by zero? |
eb3c7abad98f
ov.h: Directly call replacement functions from deprecated functions.
Rik <rik@octave.org>
parents:
23589
diff
changeset
|
527 bool is_zero_by_zero (void) const |
eb3c7abad98f
ov.h: Directly call replacement functions from deprecated functions.
Rik <rik@octave.org>
parents:
23589
diff
changeset
|
528 { return (ndims () == 2 && rows () == 0 && columns () == 0); } |
eb3c7abad98f
ov.h: Directly call replacement functions from deprecated functions.
Rik <rik@octave.org>
parents:
23589
diff
changeset
|
529 |
5759 | 530 octave_idx_type numel (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
531 { return rep->numel (); } |
4559 | 532 |
5759 | 533 size_t byte_size (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
534 { return rep->byte_size (); } |
4791 | 535 |
5759 | 536 octave_idx_type nnz (void) const { return rep->nnz (); } |
5602 | 537 |
5759 | 538 octave_idx_type nzmax (void) const { return rep->nzmax (); } |
5604 | 539 |
5900 | 540 octave_idx_type nfields (void) const { return rep->nfields (); } |
541 | |
5759 | 542 octave_value reshape (const dim_vector& dv) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
543 { return rep->reshape (dv); } |
4567 | 544 |
5759 | 545 octave_value permute (const Array<int>& vec, bool inv = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
546 { return rep->permute (vec, inv); } |
4593 | 547 |
548 octave_value ipermute (const Array<int>& vec) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
549 { return rep->permute (vec, true); } |
4593 | 550 |
5759 | 551 octave_value resize (const dim_vector& dv, bool fill = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
552 { return rep->resize (dv, fill);} |
4915 | 553 |
5785 | 554 MatrixType matrix_type (void) const |
555 { return rep->matrix_type (); } | |
556 | |
557 MatrixType matrix_type (const MatrixType& typ) const | |
558 { return rep->matrix_type (typ); } | |
559 | |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
560 // Does this constant have a type? Both of these are provided since it is |
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
561 // sometimes more natural to write is_undefined() instead of ! is_defined(). |
2376 | 562 |
5759 | 563 bool is_defined (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
564 { return rep->is_defined (); } |
2376 | 565 |
566 bool is_undefined (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
567 { return ! is_defined (); } |
2376 | 568 |
23577
80c42f4cca13
maint: Deprecate is_empty and replace with isempty.
Rik <rik@octave.org>
parents:
23576
diff
changeset
|
569 bool isempty (void) const |
80c42f4cca13
maint: Deprecate is_empty and replace with isempty.
Rik <rik@octave.org>
parents:
23576
diff
changeset
|
570 { return rep->isempty (); } |
80c42f4cca13
maint: Deprecate is_empty and replace with isempty.
Rik <rik@octave.org>
parents:
23576
diff
changeset
|
571 |
23576
00e518162fda
maint: Deprecate is_cell and replace with iscell.
Rik <rik@octave.org>
parents:
23575
diff
changeset
|
572 bool iscell (void) const |
00e518162fda
maint: Deprecate is_cell and replace with iscell.
Rik <rik@octave.org>
parents:
23575
diff
changeset
|
573 { return rep->iscell (); } |
00e518162fda
maint: Deprecate is_cell and replace with iscell.
Rik <rik@octave.org>
parents:
23575
diff
changeset
|
574 |
23575
e95738a119da
maint: Deprecate is_cellstr and replace with iscellstr.
Rik <rik@octave.org>
parents:
23502
diff
changeset
|
575 bool iscellstr (void) const |
e95738a119da
maint: Deprecate is_cellstr and replace with iscellstr.
Rik <rik@octave.org>
parents:
23502
diff
changeset
|
576 { return rep->iscellstr (); } |
e95738a119da
maint: Deprecate is_cellstr and replace with iscellstr.
Rik <rik@octave.org>
parents:
23502
diff
changeset
|
577 |
5759 | 578 bool is_real_scalar (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
579 { return rep->is_real_scalar (); } |
2376 | 580 |
5759 | 581 bool is_real_matrix (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
582 { return rep->is_real_matrix (); } |
2376 | 583 |
5759 | 584 bool is_complex_scalar (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
585 { return rep->is_complex_scalar (); } |
2376 | 586 |
5759 | 587 bool is_complex_matrix (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
588 { return rep->is_complex_matrix (); } |
2376 | 589 |
5881 | 590 bool is_bool_scalar (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
591 { return rep->is_bool_scalar (); } |
5881 | 592 |
5759 | 593 bool is_bool_matrix (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
594 { return rep->is_bool_matrix (); } |
4587 | 595 |
5759 | 596 bool is_char_matrix (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
597 { return rep->is_char_matrix (); } |
2376 | 598 |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8346
diff
changeset
|
599 bool is_diag_matrix (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
600 { return rep->is_diag_matrix (); } |
8366
8b1a2555c4e2
implement diagonal matrix objects
Jaroslav Hajek <highegg@gmail.com>
parents:
8346
diff
changeset
|
601 |
8371
c3f7e2549abb
make det & inv aware of diagonal & permutation matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8367
diff
changeset
|
602 bool is_perm_matrix (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
603 { return rep->is_perm_matrix (); } |
8371
c3f7e2549abb
make det & inv aware of diagonal & permutation matrices
Jaroslav Hajek <highegg@gmail.com>
parents:
8367
diff
changeset
|
604 |
5759 | 605 bool is_string (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
606 { return rep->is_string (); } |
2376 | 607 |
5759 | 608 bool is_sq_string (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
609 { return rep->is_sq_string (); } |
5279 | 610 |
5280 | 611 bool is_dq_string (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
612 { return rep->is_string () && ! rep->is_sq_string (); } |
5280 | 613 |
5759 | 614 bool is_range (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
615 { return rep->is_range (); } |
2376 | 616 |
23584
7ed6b258db91
maint: Deprecate is_map and replace with isstruct.
Rik <rik@octave.org>
parents:
23583
diff
changeset
|
617 bool isstruct (void) const |
7ed6b258db91
maint: Deprecate is_map and replace with isstruct.
Rik <rik@octave.org>
parents:
23583
diff
changeset
|
618 { return rep->isstruct (); } |
7ed6b258db91
maint: Deprecate is_map and replace with isstruct.
Rik <rik@octave.org>
parents:
23583
diff
changeset
|
619 |
23683
ffd27f53fc79
make +package function calls work again (bug #51295, #51296)
John W. Eaton <jwe@octave.org>
parents:
23680
diff
changeset
|
620 bool is_classdef_meta (void) const |
ffd27f53fc79
make +package function calls work again (bug #51295, #51296)
John W. Eaton <jwe@octave.org>
parents:
23680
diff
changeset
|
621 { return rep->is_classdef_meta (); } |
ffd27f53fc79
make +package function calls work again (bug #51295, #51296)
John W. Eaton <jwe@octave.org>
parents:
23680
diff
changeset
|
622 |
19110
fa48651fbb8a
isstruct for classdef objects should not return true.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
19103
diff
changeset
|
623 bool is_classdef_object (void) const |
fa48651fbb8a
isstruct for classdef objects should not return true.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
19103
diff
changeset
|
624 { return rep->is_classdef_object (); } |
23843
a52eb3f210af
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
23838
diff
changeset
|
625 |
23865
d56c18dc1373
new predicates for classdef_superclass_ref objects
John W. Eaton <jwe@octave.org>
parents:
23843
diff
changeset
|
626 bool is_classdef_superclass_ref (void) const |
d56c18dc1373
new predicates for classdef_superclass_ref objects
John W. Eaton <jwe@octave.org>
parents:
23843
diff
changeset
|
627 { return rep->is_classdef_superclass_ref (); } |
d56c18dc1373
new predicates for classdef_superclass_ref objects
John W. Eaton <jwe@octave.org>
parents:
23843
diff
changeset
|
628 |
23838
6e0fd7e3c262
Fix argument lookup in '+' package functions (Bug #51532).
Piotr Held <pjheld@gmail.com>
parents:
23683
diff
changeset
|
629 bool is_package (void) const |
6e0fd7e3c262
Fix argument lookup in '+' package functions (Bug #51532).
Piotr Held <pjheld@gmail.com>
parents:
23683
diff
changeset
|
630 { return rep->is_package (); } |
19110
fa48651fbb8a
isstruct for classdef objects should not return true.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
19103
diff
changeset
|
631 |
23587
0c468af9dc00
maint: Deprecate is_object and replace with isobject.
Rik <rik@octave.org>
parents:
23586
diff
changeset
|
632 bool isobject (void) const |
0c468af9dc00
maint: Deprecate is_object and replace with isobject.
Rik <rik@octave.org>
parents:
23586
diff
changeset
|
633 { return rep->isobject (); } |
0c468af9dc00
maint: Deprecate is_object and replace with isobject.
Rik <rik@octave.org>
parents:
23586
diff
changeset
|
634 |
23578
7b47b7c2d6c7
maint: Deprecate is_java and replace with isjava.
Rik <rik@octave.org>
parents:
23577
diff
changeset
|
635 bool isjava (void) const |
7b47b7c2d6c7
maint: Deprecate is_java and replace with isjava.
Rik <rik@octave.org>
parents:
23577
diff
changeset
|
636 { return rep->isjava (); } |
7b47b7c2d6c7
maint: Deprecate is_java and replace with isjava.
Rik <rik@octave.org>
parents:
23577
diff
changeset
|
637 |
5759 | 638 bool is_cs_list (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
639 { return rep->is_cs_list (); } |
3977 | 640 |
5759 | 641 bool is_magic_colon (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
642 { return rep->is_magic_colon (); } |
2376 | 643 |
28588
ee9b1081471f
allow integer constants > flintmax to be represented exactly (bug #45945)
John W. Eaton <jwe@octave.org>
parents:
28444
diff
changeset
|
644 bool is_magic_int (void) const |
ee9b1081471f
allow integer constants > flintmax to be represented exactly (bug #45945)
John W. Eaton <jwe@octave.org>
parents:
28444
diff
changeset
|
645 { return rep->is_magic_int (); } |
ee9b1081471f
allow integer constants > flintmax to be represented exactly (bug #45945)
John W. Eaton <jwe@octave.org>
parents:
28444
diff
changeset
|
646 |
23589
63950abd2f81
maint: Deprecate is_null_type and replace with isnull.
Rik <rik@octave.org>
parents:
23588
diff
changeset
|
647 bool isnull (void) const |
63950abd2f81
maint: Deprecate is_null_type and replace with isnull.
Rik <rik@octave.org>
parents:
23588
diff
changeset
|
648 { return rep->isnull (); } |
63950abd2f81
maint: Deprecate is_null_type and replace with isnull.
Rik <rik@octave.org>
parents:
23588
diff
changeset
|
649 |
2376 | 650 // Are any or all of the elements in this constant nonzero? |
651 | |
5759 | 652 octave_value all (int dim = 0) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
653 { return rep->all (dim); } |
2376 | 654 |
5759 | 655 octave_value any (int dim = 0) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
656 { return rep->any (dim); } |
2376 | 657 |
9685 | 658 builtin_type_t builtin_type (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
659 { return rep->builtin_type (); } |
9685 | 660 |
5895 | 661 // Floating point types. |
662 | |
663 bool is_double_type (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
664 { return rep->is_double_type (); } |
5895 | 665 |
666 bool is_single_type (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
667 { return rep->is_single_type (); } |
5895 | 668 |
23585
570170b6eb09
maint: Deprecate is_float_type and replace with isfloat.
Rik <rik@octave.org>
parents:
23584
diff
changeset
|
669 bool isfloat (void) const |
570170b6eb09
maint: Deprecate is_float_type and replace with isfloat.
Rik <rik@octave.org>
parents:
23584
diff
changeset
|
670 { return rep->isfloat (); } |
570170b6eb09
maint: Deprecate is_float_type and replace with isfloat.
Rik <rik@octave.org>
parents:
23584
diff
changeset
|
671 |
5895 | 672 // Integer types. |
673 | |
674 bool is_int8_type (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
675 { return rep->is_int8_type (); } |
5895 | 676 |
677 bool is_int16_type (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
678 { return rep->is_int16_type (); } |
5895 | 679 |
680 bool is_int32_type (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
681 { return rep->is_int32_type (); } |
5895 | 682 |
683 bool is_int64_type (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
684 { return rep->is_int64_type (); } |
5895 | 685 |
686 bool is_uint8_type (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
687 { return rep->is_uint8_type (); } |
5895 | 688 |
689 bool is_uint16_type (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
690 { return rep->is_uint16_type (); } |
5895 | 691 |
692 bool is_uint32_type (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
693 { return rep->is_uint32_type (); } |
5895 | 694 |
695 bool is_uint64_type (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
696 { return rep->is_uint64_type (); } |
5895 | 697 |
23586
f6c5db0a02e7
maint: Deprecate is_numeric_type and replace with isnumeric.
Rik <rik@octave.org>
parents:
23585
diff
changeset
|
698 bool isinteger (void) const |
f6c5db0a02e7
maint: Deprecate is_numeric_type and replace with isnumeric.
Rik <rik@octave.org>
parents:
23585
diff
changeset
|
699 { return rep->isinteger (); } |
f6c5db0a02e7
maint: Deprecate is_numeric_type and replace with isnumeric.
Rik <rik@octave.org>
parents:
23585
diff
changeset
|
700 |
2376 | 701 // Other type stuff. |
702 | |
23579
c20a0fa91c0c
maint: Deprecate is_bool_type and replace with islogical.
Rik <rik@octave.org>
parents:
23578
diff
changeset
|
703 bool islogical (void) const |
c20a0fa91c0c
maint: Deprecate is_bool_type and replace with islogical.
Rik <rik@octave.org>
parents:
23578
diff
changeset
|
704 { return rep->islogical (); } |
c20a0fa91c0c
maint: Deprecate is_bool_type and replace with islogical.
Rik <rik@octave.org>
parents:
23578
diff
changeset
|
705 |
23582
0cc2011d800e
maint: Deprecate is_real_type and replace with isreal.
Rik <rik@octave.org>
parents:
23581
diff
changeset
|
706 bool isreal (void) const |
0cc2011d800e
maint: Deprecate is_real_type and replace with isreal.
Rik <rik@octave.org>
parents:
23581
diff
changeset
|
707 { return rep->isreal (); } |
0cc2011d800e
maint: Deprecate is_real_type and replace with isreal.
Rik <rik@octave.org>
parents:
23581
diff
changeset
|
708 |
23581
c3075ae020e1
maint: Deprecate is_complex_type and replace with iscomplex.
Rik <rik@octave.org>
parents:
23580
diff
changeset
|
709 bool iscomplex (void) const |
c3075ae020e1
maint: Deprecate is_complex_type and replace with iscomplex.
Rik <rik@octave.org>
parents:
23580
diff
changeset
|
710 { return rep->iscomplex (); } |
c3075ae020e1
maint: Deprecate is_complex_type and replace with iscomplex.
Rik <rik@octave.org>
parents:
23580
diff
changeset
|
711 |
5759 | 712 bool is_scalar_type (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
713 { return rep->is_scalar_type (); } |
2376 | 714 |
5759 | 715 bool is_matrix_type (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
716 { return rep->is_matrix_type (); } |
2376 | 717 |
23586
f6c5db0a02e7
maint: Deprecate is_numeric_type and replace with isnumeric.
Rik <rik@octave.org>
parents:
23585
diff
changeset
|
718 bool isnumeric (void) const |
f6c5db0a02e7
maint: Deprecate is_numeric_type and replace with isnumeric.
Rik <rik@octave.org>
parents:
23585
diff
changeset
|
719 { return rep->isnumeric (); } |
f6c5db0a02e7
maint: Deprecate is_numeric_type and replace with isnumeric.
Rik <rik@octave.org>
parents:
23585
diff
changeset
|
720 |
23583
b7747a2c88b2
maint: Deprecate is_sparse_type and replace with issparse.
Rik <rik@octave.org>
parents:
23582
diff
changeset
|
721 bool issparse (void) const |
b7747a2c88b2
maint: Deprecate is_sparse_type and replace with issparse.
Rik <rik@octave.org>
parents:
23582
diff
changeset
|
722 { return rep->issparse (); } |
b7747a2c88b2
maint: Deprecate is_sparse_type and replace with issparse.
Rik <rik@octave.org>
parents:
23582
diff
changeset
|
723 |
2376 | 724 // Does this constant correspond to a truth value? |
725 | |
5759 | 726 bool is_true (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
727 { return rep->is_true (); } |
2376 | 728 |
8346
8302788f09db
fix empty matrix handling in switch statement
Jaroslav Hajek <highegg@gmail.com>
parents:
8345
diff
changeset
|
729 // Do two constants match (in a switch statement)? |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
730 |
8346
8302788f09db
fix empty matrix handling in switch statement
Jaroslav Hajek <highegg@gmail.com>
parents:
8345
diff
changeset
|
731 bool is_equal (const octave_value&) const; |
8302788f09db
fix empty matrix handling in switch statement
Jaroslav Hajek <highegg@gmail.com>
parents:
8345
diff
changeset
|
732 |
5759 | 733 bool is_constant (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
734 { return rep->is_constant (); } |
2974 | 735 |
5759 | 736 bool is_function_handle (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
737 { return rep->is_function_handle (); } |
4654 | 738 |
13241
2a8dcb5b3a00
improve default indexing for objects
John W. Eaton <jwe@octave.org>
parents:
13110
diff
changeset
|
739 bool is_anonymous_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
740 { return rep->is_anonymous_function (); } |
13241
2a8dcb5b3a00
improve default indexing for objects
John W. Eaton <jwe@octave.org>
parents:
13110
diff
changeset
|
741 |
5759 | 742 bool is_inline_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
743 { return rep->is_inline_function (); } |
4954 | 744 |
5759 | 745 bool is_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
746 { return rep->is_function (); } |
2891 | 747 |
7336 | 748 bool is_user_script (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
749 { return rep->is_user_script (); } |
7336 | 750 |
751 bool is_user_function (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
752 { return rep->is_user_function (); } |
7336 | 753 |
7719
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
754 bool is_user_code (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
755 { return rep->is_user_code (); } |
7719
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
756 |
5759 | 757 bool is_builtin_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
758 { return rep->is_builtin_function (); } |
3325 | 759 |
5759 | 760 bool is_dld_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
761 { return rep->is_dld_function (); } |
3325 | 762 |
5864 | 763 bool is_mex_function (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
764 { return rep->is_mex_function (); } |
5864 | 765 |
7876
8447a5024650
clear subfunctions when clearing parent function
John W. Eaton <jwe@octave.org>
parents:
7800
diff
changeset
|
766 void erase_subfunctions (void) { rep->erase_subfunctions (); } |
8447a5024650
clear subfunctions when clearing parent function
John W. Eaton <jwe@octave.org>
parents:
7800
diff
changeset
|
767 |
2376 | 768 // Values. |
769 | |
2891 | 770 octave_value eval (void) { return *this; } |
771 | |
5759 | 772 short int |
4254 | 773 short_value (bool req_int = false, 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
|
774 { return rep->short_value (req_int, frc_str_conv); } |
4254 | 775 |
5759 | 776 unsigned short int |
4254 | 777 ushort_value (bool req_int = false, 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
|
778 { return rep->ushort_value (req_int, frc_str_conv); } |
4254 | 779 |
5759 | 780 int int_value (bool req_int = false, 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
|
781 { return rep->int_value (req_int, frc_str_conv); } |
3202 | 782 |
5759 | 783 unsigned int |
4254 | 784 uint_value (bool req_int = false, 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
|
785 { return rep->uint_value (req_int, frc_str_conv); } |
4254 | 786 |
5759 | 787 int nint_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
|
788 { return rep->nint_value (frc_str_conv); } |
3202 | 789 |
5759 | 790 long int |
4254 | 791 long_value (bool req_int = false, 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
|
792 { return rep->long_value (req_int, frc_str_conv); } |
4254 | 793 |
5759 | 794 unsigned long int |
4254 | 795 ulong_value (bool req_int = false, 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
|
796 { return rep->ulong_value (req_int, frc_str_conv); } |
4254 | 797 |
16323
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
16091
diff
changeset
|
798 int64_t |
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
16091
diff
changeset
|
799 int64_value (bool req_int = false, 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
|
800 { return rep->int64_value (req_int, frc_str_conv); } |
16323
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
16091
diff
changeset
|
801 |
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
16091
diff
changeset
|
802 uint64_t |
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
16091
diff
changeset
|
803 uint64_value (bool req_int = false, 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
|
804 { return rep->uint64_value (req_int, frc_str_conv); } |
16323
e769440b39db
provide int64 extractors for octave_value class
John W. Eaton <jwe@octave.org>
parents:
16091
diff
changeset
|
805 |
6133 | 806 octave_idx_type |
8017
260294a5520f
octave_value::idx_type_value: move definition to ov.cc from ov.h
John W. Eaton <jwe@octave.org>
parents:
7885
diff
changeset
|
807 idx_type_value (bool req_int = false, bool frc_str_conv = false) const; |
6133 | 808 |
5759 | 809 double double_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
|
810 { return rep->double_value (frc_str_conv); } |
2376 | 811 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
812 float float_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
|
813 { return rep->float_value (frc_str_conv); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
814 |
5759 | 815 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
|
816 { return rep->scalar_value (frc_str_conv); } |
2916 | 817 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
818 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
|
819 { return rep->float_scalar_value (frc_str_conv); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
820 |
5759 | 821 Matrix matrix_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
|
822 { return rep->matrix_value (frc_str_conv); } |
2376 | 823 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
824 FloatMatrix float_matrix_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
|
825 { return rep->float_matrix_value (frc_str_conv); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
826 |
5759 | 827 NDArray array_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
|
828 { return rep->array_value (frc_str_conv); } |
4505 | 829 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
830 FloatNDArray float_array_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
|
831 { return rep->float_array_value (frc_str_conv); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
832 |
5759 | 833 Complex complex_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
|
834 { return rep->complex_value (frc_str_conv); } |
2376 | 835 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
836 FloatComplex float_complex_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
|
837 { return rep->float_complex_value (frc_str_conv); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
838 |
5759 | 839 ComplexMatrix complex_matrix_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
|
840 { return rep->complex_matrix_value (frc_str_conv); } |
2376 | 841 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
842 FloatComplexMatrix |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
843 float_complex_matrix_value (bool frc_str_conv = false) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
844 { return rep->float_complex_matrix_value (frc_str_conv); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
845 |
5759 | 846 ComplexNDArray complex_array_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
|
847 { return rep->complex_array_value (frc_str_conv); } |
4550 | 848 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
849 FloatComplexNDArray |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
850 float_complex_array_value (bool frc_str_conv = false) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
851 { return rep->float_complex_array_value (frc_str_conv); } |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
852 |
5943 | 853 bool bool_value (bool warn = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
854 { return rep->bool_value (warn); } |
4550 | 855 |
5943 | 856 boolMatrix bool_matrix_value (bool warn = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
857 { return rep->bool_matrix_value (warn); } |
4550 | 858 |
5943 | 859 boolNDArray bool_array_value (bool warn = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
860 { return rep->bool_array_value (warn); } |
4550 | 861 |
5759 | 862 charMatrix char_matrix_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
|
863 { return rep->char_matrix_value (frc_str_conv); } |
2376 | 864 |
5759 | 865 charNDArray char_array_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
|
866 { return rep->char_array_value (frc_str_conv); } |
4550 | 867 |
5759 | 868 SparseMatrix sparse_matrix_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
|
869 { return rep->sparse_matrix_value (frc_str_conv); } |
5164 | 870 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
871 SparseComplexMatrix |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
872 sparse_complex_matrix_value (bool frc_str_conv = false) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
873 { return rep->sparse_complex_matrix_value (frc_str_conv); } |
5164 | 874 |
9852
aabf7a8c2e57
implement sparse logical conversion
Jaroslav Hajek <highegg@gmail.com>
parents:
9835
diff
changeset
|
875 SparseBoolMatrix sparse_bool_matrix_value (bool warn = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
876 { return rep->sparse_bool_matrix_value (warn); } |
5164 | 877 |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8811
diff
changeset
|
878 DiagMatrix diag_matrix_value (bool force = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
879 { return rep->diag_matrix_value (force); } |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
880 |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8811
diff
changeset
|
881 FloatDiagMatrix float_diag_matrix_value (bool force = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
882 { return rep->float_diag_matrix_value (force); } |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
883 |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8811
diff
changeset
|
884 ComplexDiagMatrix complex_diag_matrix_value (bool force = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
885 { return rep->complex_diag_matrix_value (force); } |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
886 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
887 FloatComplexDiagMatrix |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
888 float_complex_diag_matrix_value (bool force = false) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
889 { return rep->float_complex_diag_matrix_value (force); } |
8916
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8811
diff
changeset
|
890 |
a2878ba31a9e
add diag & perm matrix query methods to octave_value
Jaroslav Hajek <highegg@gmail.com>
parents:
8811
diff
changeset
|
891 PermMatrix perm_matrix_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
892 { return rep->perm_matrix_value (); } |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
893 |
5759 | 894 octave_int8 int8_scalar_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
895 { return rep->int8_scalar_value (); } |
4910 | 896 |
5759 | 897 octave_int16 int16_scalar_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
898 { return rep->int16_scalar_value (); } |
4910 | 899 |
5759 | 900 octave_int32 int32_scalar_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
901 { return rep->int32_scalar_value (); } |
4910 | 902 |
5759 | 903 octave_int64 int64_scalar_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
904 { return rep->int64_scalar_value (); } |
4910 | 905 |
5759 | 906 octave_uint8 uint8_scalar_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
907 { return rep->uint8_scalar_value (); } |
4910 | 908 |
5759 | 909 octave_uint16 uint16_scalar_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
910 { return rep->uint16_scalar_value (); } |
4910 | 911 |
5759 | 912 octave_uint32 uint32_scalar_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
913 { return rep->uint32_scalar_value (); } |
4910 | 914 |
5759 | 915 octave_uint64 uint64_scalar_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
916 { return rep->uint64_scalar_value (); } |
4910 | 917 |
5759 | 918 int8NDArray int8_array_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
919 { return rep->int8_array_value (); } |
4906 | 920 |
5759 | 921 int16NDArray int16_array_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
922 { return rep->int16_array_value (); } |
4906 | 923 |
5759 | 924 int32NDArray int32_array_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
925 { return rep->int32_array_value (); } |
4906 | 926 |
5759 | 927 int64NDArray int64_array_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
928 { return rep->int64_array_value (); } |
4906 | 929 |
5759 | 930 uint8NDArray uint8_array_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
931 { return rep->uint8_array_value (); } |
4906 | 932 |
5759 | 933 uint16NDArray uint16_array_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
934 { return rep->uint16_array_value (); } |
4906 | 935 |
5759 | 936 uint32NDArray uint32_array_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
937 { return rep->uint32_array_value (); } |
4906 | 938 |
5759 | 939 uint64NDArray uint64_array_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
940 { return rep->uint64_array_value (); } |
4906 | 941 |
5759 | 942 std::string string_value (bool force = false) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
943 { return rep->string_value (force); } |
2376 | 944 |
20990
fc9cca99b2de
Deprecate all_strings, replace with string_vector_value.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
945 string_vector string_vector_value (bool pad = false) const |
fc9cca99b2de
Deprecate all_strings, replace with string_vector_value.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
946 { return rep->string_vector_value (pad); } |
fc9cca99b2de
Deprecate all_strings, replace with string_vector_value.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
947 |
20703
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
948 Cell cell_value (void) const; |
2376 | 949 |
8732 | 950 Array<std::string> cellstr_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
951 { return rep->cellstr_value (); } |
8732 | 952 |
28646
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
953 octave::range<float> float_range_value (void) const |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
954 { return rep->float_range_value (); } |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
955 |
28638
98192ec1621f
replace Range with range<double>
John W. Eaton <jwe@octave.org>
parents:
28633
diff
changeset
|
956 octave::range<double> range_value (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
957 { return rep->range_value (); } |
2376 | 958 |
28646
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
959 octave::range<octave_int8> int8_range_value (void) const |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
960 { return rep->int8_range_value (); } |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
961 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
962 octave::range<octave_int16> int16_range_value (void) const |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
963 { return rep->int16_range_value (); } |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
964 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
965 octave::range<octave_int32> int32_range_value (void) const |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
966 { return rep->int32_range_value (); } |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
967 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
968 octave::range<octave_int64> int64_range_value (void) const |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
969 { return rep->int64_range_value (); } |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
970 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
971 octave::range<octave_uint8> uint8_range_value (void) const |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
972 { return rep->uint8_range_value (); } |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
973 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
974 octave::range<octave_uint16> uint16_range_value (void) const |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
975 { return rep->uint16_range_value (); } |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
976 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
977 octave::range<octave_uint32> uint32_range_value (void) const |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
978 { return rep->uint32_range_value (); } |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
979 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
980 octave::range<octave_uint64> uint64_range_value (void) const |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
981 { return rep->uint64_range_value (); } |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
982 |
10742
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
983 octave_map map_value (void) const; |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
984 |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
985 octave_scalar_map scalar_map_value (void) const; |
604e13a89c7f
initial code for structs rewrite
Jaroslav Hajek <highegg@gmail.com>
parents:
10670
diff
changeset
|
986 |
5759 | 987 string_vector map_keys (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
988 { return rep->map_keys (); } |
3933 | 989 |
9151 | 990 size_t nparents (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
991 { return rep->nparents (); } |
9151 | 992 |
993 std::list<std::string> parent_class_name_list (void) const | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
994 { return rep->parent_class_name_list (); } |
9151 | 995 |
9010
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8992
diff
changeset
|
996 string_vector parent_class_names (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
997 { return rep->parent_class_names (); } |
9010
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8992
diff
changeset
|
998 |
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8992
diff
changeset
|
999 octave_base_value * |
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8992
diff
changeset
|
1000 find_parent_class (const std::string& parent_class_name) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1001 { return rep->find_parent_class (parent_class_name); } |
9010
f914834836e7
Partial implementation of derived classes using the old form with "@" files.
rtshort@smoketree.phaselocked.com
parents:
8992
diff
changeset
|
1002 |
19103
56bc1464ec59
Implement "isa" for classdef objects.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18416
diff
changeset
|
1003 bool is_instance_of (const std::string& cls_name) const |
56bc1464ec59
Implement "isa" for classdef objects.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18416
diff
changeset
|
1004 { return rep->is_instance_of (cls_name); } |
56bc1464ec59
Implement "isa" for classdef objects.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18416
diff
changeset
|
1005 |
23881
5aec653c88e7
new function for accessing classdef objects
John W. Eaton <jwe@octave.org>
parents:
23865
diff
changeset
|
1006 octave_classdef * classdef_object_value (bool silent = false) const; |
5aec653c88e7
new function for accessing classdef objects
John W. Eaton <jwe@octave.org>
parents:
23865
diff
changeset
|
1007 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1008 octave_function * function_value (bool silent = false) const; |
2974 | 1009 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1010 octave_user_function * user_function_value (bool silent = false) const; |
7761
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1011 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1012 octave_user_script * user_script_value (bool silent = false) const; |
4700 | 1013 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1014 octave_user_code * user_code_value (bool silent = false) const; |
7719
87eda1f8faaa
octave_user_code: new base class for octave_user_script and octave_user_function
John W. Eaton <jwe@octave.org>
parents:
7638
diff
changeset
|
1015 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1016 octave_fcn_handle * fcn_handle_value (bool silent = false) const; |
4343 | 1017 |
5759 | 1018 octave_value_list list_value (void) const; |
2880 | 1019 |
3419 | 1020 ColumnVector column_vector_value (bool frc_str_conv = false, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1021 bool frc_vec_conv = false) const; |
2376 | 1022 |
1023 ComplexColumnVector | |
3419 | 1024 complex_column_vector_value (bool frc_str_conv = false, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1025 bool frc_vec_conv = false) const; |
2376 | 1026 |
3419 | 1027 RowVector row_vector_value (bool frc_str_conv = false, |
10313 | 1028 bool frc_vec_conv = false) const; |
3419 | 1029 |
1030 ComplexRowVector | |
1031 complex_row_vector_value (bool frc_str_conv = false, | |
10313 | 1032 bool frc_vec_conv = false) const; |
3419 | 1033 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1034 FloatColumnVector float_column_vector_value (bool frc_str_conv = false, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1035 bool frc_vec_conv = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1036 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1037 FloatComplexColumnVector |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1038 float_complex_column_vector_value (bool frc_str_conv = false, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1039 bool frc_vec_conv = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1040 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1041 FloatRowVector float_row_vector_value (bool frc_str_conv = false, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1042 bool frc_vec_conv = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1043 |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1044 FloatComplexRowVector |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1045 float_complex_row_vector_value (bool frc_str_conv = false, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1046 bool frc_vec_conv = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1047 |
4044 | 1048 Array<int> int_vector_value (bool req_int = false, |
10313 | 1049 bool frc_str_conv = false, |
1050 bool frc_vec_conv = false) const; | |
4044 | 1051 |
8811 | 1052 Array<octave_idx_type> |
1053 octave_idx_type_vector_value (bool req_int = false, | |
10313 | 1054 bool frc_str_conv = false, |
1055 bool frc_vec_conv = false) const; | |
8811 | 1056 |
3419 | 1057 Array<double> vector_value (bool frc_str_conv = false, |
10313 | 1058 bool frc_vec_conv = false) const; |
3419 | 1059 |
1060 Array<Complex> complex_vector_value (bool frc_str_conv = false, | |
10313 | 1061 bool frc_vec_conv = false) const; |
3419 | 1062 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1063 Array<float> float_vector_value (bool frc_str_conv = false, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1064 bool frc_vec_conv = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1065 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1066 Array<FloatComplex> |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1067 float_complex_vector_value (bool frc_str_conv = false, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1068 bool frc_vec_conv = false) const; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
1069 |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
1070 // Extract values of specific types without any implicit type conversions. |
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
1071 // Throw an error if an object is the wrong type for the requested value |
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
1072 // extraction. |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20696
diff
changeset
|
1073 // |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
1074 // These functions are intended to provide a simple way to extract values of |
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
1075 // specific types and display error messages that are more meaningful than |
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
1076 // the generic "error: wrong type argument 'cell'" message. |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20696
diff
changeset
|
1077 |
20703
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1078 short int xshort_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1079 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1080 unsigned short int xushort_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1081 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1082 int xint_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1083 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1084 unsigned int xuint_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1085 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1086 int xnint_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1087 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1088 long int xlong_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1089 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1090 unsigned long int xulong_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1091 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1092 int64_t xint64_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1093 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1094 uint64_t xuint64_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1095 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1096 octave_idx_type xidx_type_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1097 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1098 double xdouble_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1099 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1100 float xfloat_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1101 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1102 double xscalar_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1103 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1104 float xfloat_scalar_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1105 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1106 Matrix xmatrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1107 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1108 FloatMatrix xfloat_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1109 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1110 NDArray xarray_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1111 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1112 FloatNDArray xfloat_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1113 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1114 Complex xcomplex_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1115 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1116 FloatComplex xfloat_complex_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1117 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1118 ComplexMatrix xcomplex_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1119 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1120 FloatComplexMatrix xfloat_complex_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1121 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1122 ComplexNDArray xcomplex_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1123 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1124 FloatComplexNDArray xfloat_complex_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1125 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1126 bool xbool_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1127 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1128 boolMatrix xbool_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1129 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1130 boolNDArray xbool_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1131 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1132 charMatrix xchar_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1133 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1134 charNDArray xchar_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1135 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1136 SparseMatrix xsparse_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1137 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1138 SparseComplexMatrix xsparse_complex_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1139 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1140 SparseBoolMatrix xsparse_bool_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1141 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1142 DiagMatrix xdiag_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1143 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1144 FloatDiagMatrix xfloat_diag_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1145 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1146 ComplexDiagMatrix xcomplex_diag_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1147 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1148 FloatComplexDiagMatrix xfloat_complex_diag_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1149 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1150 PermMatrix xperm_matrix_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1151 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1152 octave_int8 xint8_scalar_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1153 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1154 octave_int16 xint16_scalar_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1155 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1156 octave_int32 xint32_scalar_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1157 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1158 octave_int64 xint64_scalar_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1159 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1160 octave_uint8 xuint8_scalar_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1161 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1162 octave_uint16 xuint16_scalar_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1163 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1164 octave_uint32 xuint32_scalar_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1165 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1166 octave_uint64 xuint64_scalar_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1167 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1168 int8NDArray xint8_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1169 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1170 int16NDArray xint16_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1171 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1172 int32NDArray xint32_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1173 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1174 int64NDArray xint64_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1175 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1176 uint8NDArray xuint8_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1177 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1178 uint16NDArray xuint16_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1179 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1180 uint32NDArray xuint32_array_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1181 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1182 uint64NDArray xuint64_array_value (const char *fmt, ...) const; |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20696
diff
changeset
|
1183 |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20696
diff
changeset
|
1184 std::string xstring_value (const char *fmt, ...) const; |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20696
diff
changeset
|
1185 |
20990
fc9cca99b2de
Deprecate all_strings, replace with string_vector_value.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
1186 string_vector xstring_vector_value (const char *fmt, ...) const; |
20704
571508c1ed06
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20703
diff
changeset
|
1187 |
20703
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1188 Cell xcell_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1189 |
20700
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20696
diff
changeset
|
1190 Array<std::string> xcellstr_value (const char *fmt, ...) const; |
68e3a747ca02
rename octave_value value extractors that accept error message args
John W. Eaton <jwe@octave.org>
parents:
20696
diff
changeset
|
1191 |
28646
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1192 octave::range<float> xfloat_range_value (const char *fmt, ...) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1193 |
28638
98192ec1621f
replace Range with range<double>
John W. Eaton <jwe@octave.org>
parents:
28633
diff
changeset
|
1194 octave::range<double> xrange_value (const char *fmt, ...) const; |
20703
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1195 |
28646
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1196 octave::range<octave_int8> xint8_range_value (const char *fmt, ...) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1197 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1198 octave::range<octave_int16> xint16_range_value (const char *fmt, ...) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1199 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1200 octave::range<octave_int32> xint32_range_value (const char *fmt, ...) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1201 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1202 octave::range<octave_int64> xint64_range_value (const char *fmt, ...) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1203 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1204 octave::range<octave_uint8> xuint8_range_value (const char *fmt, ...) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1205 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1206 octave::range<octave_uint16> xuint16_range_value (const char *fmt, ...) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1207 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1208 octave::range<octave_uint32> xuint32_range_value (const char *fmt, ...) const; |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1209 |
e26201931ea3
new template class for octave_range objects
John W. Eaton <jwe@octave.org>
parents:
28639
diff
changeset
|
1210 octave::range<octave_uint64> xuint64_range_value (const char *fmt, ...) const; |
20703
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1211 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1212 octave_map xmap_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1213 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1214 octave_scalar_map xscalar_map_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1215 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1216 ColumnVector xcolumn_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1217 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1218 ComplexColumnVector |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1219 xcomplex_column_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1220 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1221 RowVector xrow_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1222 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1223 ComplexRowVector xcomplex_row_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1224 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1225 FloatColumnVector xfloat_column_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1226 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1227 FloatComplexColumnVector |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1228 xfloat_complex_column_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1229 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1230 FloatRowVector xfloat_row_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1231 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1232 FloatComplexRowVector |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1233 xfloat_complex_row_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1234 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1235 Array<int> xint_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1236 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1237 Array<octave_idx_type> |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1238 xoctave_idx_type_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1239 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1240 Array<double> xvector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1241 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1242 Array<Complex> xcomplex_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1243 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1244 Array<float> xfloat_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1245 |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1246 Array<FloatComplex> xfloat_complex_vector_value (const char *fmt, ...) const; |
85e5efae848a
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20700
diff
changeset
|
1247 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1248 octave_function * xfunction_value (const char *fmt, ...) const; |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1249 octave_user_function * xuser_function_value (const char *fmt, ...) const; |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1250 octave_user_script * xuser_script_value (const char *fmt, ...) const; |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1251 octave_user_code * xuser_code_value (const char *fmt, ...) const; |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1252 octave_fcn_handle * xfcn_handle_value (const char *fmt, ...) const; |
20741
a5ab31b52ae8
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20704
diff
changeset
|
1253 |
a5ab31b52ae8
eliminate more uses of error_state
John W. Eaton <jwe@octave.org>
parents:
20704
diff
changeset
|
1254 octave_value_list xlist_value (const char *fmt, ...) const; |
20768
7655b399abff
eliminate trailing whitespace in source files we maintain
John W. Eaton <jwe@octave.org>
parents:
20741
diff
changeset
|
1255 |
8523
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
1256 // Possibly economize a lazy-indexed value. |
8150
283989f2da9b
make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents:
8017
diff
changeset
|
1257 |
8523
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
1258 void maybe_economize (void) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1259 { rep->maybe_economize (); } |
8523
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
1260 |
8531
b01fef323c24
add some explaining comments
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
1261 // The following two hook conversions are called on any octave_value prior to |
b01fef323c24
add some explaining comments
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
1262 // storing it to a "permanent" location, like a named variable, a cell or a |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
1263 // struct component, or a return value of a function. |
8523
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
1264 |
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
1265 octave_value storable_value (void) const; |
8150
283989f2da9b
make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents:
8017
diff
changeset
|
1266 |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21739
diff
changeset
|
1267 // Ditto, but in place, i.e., equivalent to *this = this->storable_value (), |
8531
b01fef323c24
add some explaining comments
Jaroslav Hajek <highegg@gmail.com>
parents:
8523
diff
changeset
|
1268 // but possibly more efficient. |
8150
283989f2da9b
make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents:
8017
diff
changeset
|
1269 |
8523
ad3afaaa19c1
implement non-copying contiguous range indexing
Jaroslav Hajek <highegg@gmail.com>
parents:
8458
diff
changeset
|
1270 void make_storable_value (void); |
8150
283989f2da9b
make null assignment matlab compatible
Jaroslav Hajek <highegg@gmail.com>
parents:
8017
diff
changeset
|
1271 |
21076
b433f9990452
strip trailing whitespace from files
John W. Eaton <jwe@octave.org>
parents:
21040
diff
changeset
|
1272 // FIXME: These should probably be private. |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
1273 // Conversions. If a user of this class wants a certain kind of constant, |
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
1274 // he should simply ask for it, and we should convert it if possible. |
2376 | 1275 |
5279 | 1276 octave_value convert_to_str (bool pad = false, bool force = false, |
10313 | 1277 char type = '\'') const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1278 { return rep->convert_to_str (pad, force, type); } |
4452 | 1279 |
5759 | 1280 octave_value |
5279 | 1281 convert_to_str_internal (bool pad, bool force, char type) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1282 { return rep->convert_to_str_internal (pad, force, type); } |
2376 | 1283 |
5759 | 1284 void convert_to_row_or_column_vector (void) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1285 { rep->convert_to_row_or_column_vector (); } |
2376 | 1286 |
5759 | 1287 bool print_as_scalar (void) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1288 { return rep->print_as_scalar (); } |
4604 | 1289 |
18416
bcd71a2531d3
Support disp/display overloading in classdef
Michael Goffioul <michael.goffioul@gmail.com>
parents:
18402
diff
changeset
|
1290 void print (std::ostream& os, bool pr_as_read_syntax = false) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1291 { rep->print (os, pr_as_read_syntax); } |
2376 | 1292 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1293 void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1294 { rep->print_raw (os, pr_as_read_syntax); } |
2903 | 1295 |
5759 | 1296 bool print_name_tag (std::ostream& os, const std::string& name) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1297 { return rep->print_name_tag (os, name); } |
2376 | 1298 |
13110
2d5035847529
Add Júlio Hoffimann Mendes to contributors.in
John W. Eaton <jwe@octave.org>
parents:
12171
diff
changeset
|
1299 void print_with_name (std::ostream& os, const std::string& name) const |
2d5035847529
Add Júlio Hoffimann Mendes to contributors.in
John W. Eaton <jwe@octave.org>
parents:
12171
diff
changeset
|
1300 { rep->print_with_name (os, name, true); } |
2376 | 1301 |
17870 | 1302 void short_disp (std::ostream& os) const { rep->short_disp (os); } |
16468
0f143f68078d
use signal/slot for updating workspace instead of using event listener
John W. Eaton <jwe@octave.org>
parents:
16323
diff
changeset
|
1303 |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24643
diff
changeset
|
1304 float_display_format get_edit_display_format (void) const; |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24643
diff
changeset
|
1305 |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24643
diff
changeset
|
1306 std::string edit_display (const float_display_format& fmt, |
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24643
diff
changeset
|
1307 octave_idx_type i, octave_idx_type j) const |
24643
78aff6f14227
more variable editor improvements; allow more variable types to be edited
John W. Eaton <jwe@octave.org>
parents:
24624
diff
changeset
|
1308 { |
24668
d4dd741b2794
new octave_value functions for formatting output
John W. Eaton <jwe@octave.org>
parents:
24643
diff
changeset
|
1309 return rep->edit_display (fmt, i, j); |
24643
78aff6f14227
more variable editor improvements; allow more variable types to be edited
John W. Eaton <jwe@octave.org>
parents:
24624
diff
changeset
|
1310 } |
78aff6f14227
more variable editor improvements; allow more variable types to be edited
John W. Eaton <jwe@octave.org>
parents:
24624
diff
changeset
|
1311 |
5759 | 1312 int type_id (void) const { return rep->type_id (); } |
2376 | 1313 |
5759 | 1314 std::string type_name (void) const { return rep->type_name (); } |
1315 | |
1316 std::string class_name (void) const { return rep->class_name (); } | |
4612 | 1317 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1318 // Unary operations that are member functions. There are also some |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1319 // non-member functions for unary and binary operations declared |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1320 // below, outside of the octave_value class declaration. |
2376 | 1321 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1322 octave_value& non_const_unary_op (unary_op op); |
7800
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
1323 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1324 OCTAVE_DEPRECATED (7, "use 'octave_value::non_const_unary_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1325 octave_value& do_non_const_unary_op (unary_op op) |
19749
c913247c85a8
make colon function work (bug #44290)
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
1326 { |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1327 return non_const_unary_op (op); |
19749
c913247c85a8
make colon function work (bug #44290)
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
1328 } |
c913247c85a8
make colon function work (bug #44290)
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
1329 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1330 octave_value& non_const_unary_op (unary_op op, const std::string& type, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1331 const std::list<octave_value_list>& idx); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1332 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1333 OCTAVE_DEPRECATED (7, "use 'octave_value::non_const_unary_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1334 octave_value& do_non_const_unary_op (unary_op op, const std::string& type, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1335 const std::list<octave_value_list>& idx) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1336 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1337 return non_const_unary_op (op, type, idx); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1338 } |
19749
c913247c85a8
make colon function work (bug #44290)
John W. Eaton <jwe@octave.org>
parents:
19697
diff
changeset
|
1339 |
5759 | 1340 const octave_base_value& get_rep (void) const { return *rep; } |
3301 | 1341 |
23433
c9fab0bc983e
maint: Use convention 'int& x' for naming references.
Rik <rik@octave.org>
parents:
23352
diff
changeset
|
1342 bool is_copy_of (const octave_value& val) const { return rep == val.rep; } |
8456
c1709a45b45b
optimize structure components access
Jaroslav Hajek <highegg@gmail.com>
parents:
8437
diff
changeset
|
1343 |
5759 | 1344 void print_info (std::ostream& os, |
21017
93748bcaec17
maint: Replace emtpy 'std::string ()' calls with "".
Rik <rik@octave.org>
parents:
21013
diff
changeset
|
1345 const std::string& prefix = "") const; |
3933 | 1346 |
6974 | 1347 bool save_ascii (std::ostream& os) { return rep->save_ascii (os); } |
4687 | 1348 |
6974 | 1349 bool load_ascii (std::istream& is) { return rep->load_ascii (is); } |
4687 | 1350 |
26399
586413770c7f
pass save_as_floats by value in octave_value save_binary functions
John W. Eaton <jwe@octave.org>
parents:
26377
diff
changeset
|
1351 bool save_binary (std::ostream& os, bool save_as_floats) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1352 { return rep->save_binary (os, save_as_floats); } |
4687 | 1353 |
5759 | 1354 bool load_binary (std::istream& is, bool swap, |
21739
c4ab2e54f100
use namespace for oct_mach_info class
John W. Eaton <jwe@octave.org>
parents:
21730
diff
changeset
|
1355 octave::mach_info::float_format fmt) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1356 { return rep->load_binary (is, swap, fmt); } |
4687 | 1357 |
19863
09ed6f7538dd
avoid needing to include hdf5 in public header files (bug #44370, #43180)
John W. Eaton <jwe@octave.org> and Mike Miller <mtmiller@ieee.org>
parents:
19749
diff
changeset
|
1358 bool save_hdf5 (octave_hdf5_id loc_id, const char *name, |
09ed6f7538dd
avoid needing to include hdf5 in public header files (bug #44370, #43180)
John W. Eaton <jwe@octave.org> and Mike Miller <mtmiller@ieee.org>
parents:
19749
diff
changeset
|
1359 bool save_as_floats) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1360 { return rep->save_hdf5 (loc_id, name, save_as_floats); } |
4687 | 1361 |
19863
09ed6f7538dd
avoid needing to include hdf5 in public header files (bug #44370, #43180)
John W. Eaton <jwe@octave.org> and Mike Miller <mtmiller@ieee.org>
parents:
19749
diff
changeset
|
1362 bool load_hdf5 (octave_hdf5_id loc_id, const char *name) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1363 { return rep->load_hdf5 (loc_id, name); } |
4687 | 1364 |
23059
b98ebcd7f11c
move some octave stream classes into octave namespace
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
1365 int write (octave::stream& os, int block_size, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1366 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:
21730
diff
changeset
|
1367 octave::mach_info::float_format flt_fmt) const; |
4944 | 1368 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1369 octave_base_value * internal_rep (void) const { return rep; } |
4901 | 1370 |
5900 | 1371 // Unsafe. These functions exist to support the MEX interface. |
1372 // You should not use them anywhere else. | |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
1373 void * mex_get_data (mxClassID class_id = mxUNKNOWN_CLASS, |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
1374 mxComplexity complexity = mxREAL) const; |
5900 | 1375 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1376 octave_idx_type * mex_get_ir (void) const { return rep->mex_get_ir (); } |
5900 | 1377 |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23433
diff
changeset
|
1378 octave_idx_type * mex_get_jc (void) const { return rep->mex_get_jc (); } |
5900 | 1379 |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
1380 mxArray * as_mxArray (bool interleaved = false) const |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
28123
diff
changeset
|
1381 { return rep->as_mxArray (interleaved); } |
5900 | 1382 |
7620
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7576
diff
changeset
|
1383 octave_value diag (octave_idx_type k = 0) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1384 { return rep->diag (k); } |
7620
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7576
diff
changeset
|
1385 |
14557
e8e86ae3abbc
make diag (x, m, n) return a proper diagonal matrix object (bug #36099)
John W. Eaton <jwe@octave.org>
parents:
14528
diff
changeset
|
1386 octave_value diag (octave_idx_type m, octave_idx_type n) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1387 { return rep->diag (m, n); } |
14557
e8e86ae3abbc
make diag (x, m, n) return a proper diagonal matrix object (bug #36099)
John W. Eaton <jwe@octave.org>
parents:
14528
diff
changeset
|
1388 |
7463
2467639bd8c0
eliminate UNDEFINED sort mode
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1389 octave_value sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1390 { return rep->sort (dim, mode); } |
7433 | 1391 octave_value sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1392 sortmode mode = ASCENDING) const |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1393 { return rep->sort (sidx, dim, mode); } |
7433 | 1394 |
23588
0549061d35b9
maint: Deprecate is_sorted and replace with issorted.
Rik <rik@octave.org>
parents:
23587
diff
changeset
|
1395 sortmode issorted (sortmode mode = UNSORTED) const |
0549061d35b9
maint: Deprecate is_sorted and replace with issorted.
Rik <rik@octave.org>
parents:
23587
diff
changeset
|
1396 { return rep->issorted (mode); } |
0549061d35b9
maint: Deprecate is_sorted and replace with issorted.
Rik <rik@octave.org>
parents:
23587
diff
changeset
|
1397 |
8733
3ef774603887
rename all uses of sortrows_idx to sort_rows_idx
John W. Eaton <jwe@octave.org>
parents:
8732
diff
changeset
|
1398 Array<octave_idx_type> sort_rows_idx (sortmode mode = ASCENDING) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1399 { return rep->sort_rows_idx (mode); } |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
1400 |
8734
767ed8cc6634
rename internal issorted and issorted_rows functions to is_sorted and is_sorted_rows
John W. Eaton <jwe@octave.org>
parents:
8733
diff
changeset
|
1401 sortmode is_sorted_rows (sortmode mode = UNSORTED) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1402 { return rep->is_sorted_rows (mode); } |
8721
e9cb742df9eb
imported patch sort3.diff
Jaroslav Hajek <highegg@gmail.com>
parents:
8676
diff
changeset
|
1403 |
7489
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
1404 void lock (void) { rep->lock (); } |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
1405 |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
1406 void unlock (void) { rep->unlock (); } |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
1407 |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
1408 bool islocked (void) const { return rep->islocked (); } |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7463
diff
changeset
|
1409 |
26655
cca0548f7b86
refactor calling object destructor
John W. Eaton <jwe@octave.org>
parents:
26399
diff
changeset
|
1410 void call_object_destructor (void) { return rep->call_object_destructor (); } |
cca0548f7b86
refactor calling object destructor
John W. Eaton <jwe@octave.org>
parents:
26399
diff
changeset
|
1411 |
23680
ef71711f6d64
rework __dump_symbol_table__ function
John W. Eaton <jwe@octave.org>
parents:
23678
diff
changeset
|
1412 octave_value dump (void) const { return rep->dump (); } |
7761
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1413 |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1414 #define MAPPER_FORWARD(F) \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1415 octave_value F (void) const \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1416 { \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1417 return rep->map (octave_base_value::umap_ ## F); \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1418 } |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1419 |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1420 MAPPER_FORWARD (abs) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1421 MAPPER_FORWARD (acos) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1422 MAPPER_FORWARD (acosh) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1423 MAPPER_FORWARD (angle) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1424 MAPPER_FORWARD (arg) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1425 MAPPER_FORWARD (asin) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1426 MAPPER_FORWARD (asinh) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1427 MAPPER_FORWARD (atan) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1428 MAPPER_FORWARD (atanh) |
10414
2a8b1db1e2ca
implement built-in cbrt
Jaroslav Hajek <highegg@gmail.com>
parents:
10391
diff
changeset
|
1429 MAPPER_FORWARD (cbrt) |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1430 MAPPER_FORWARD (ceil) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1431 MAPPER_FORWARD (conj) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1432 MAPPER_FORWARD (cos) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1433 MAPPER_FORWARD (cosh) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1434 MAPPER_FORWARD (erf) |
9835
1bb1ed717d2f
implement built-in erfinv
Jaroslav Hajek <highegg@gmail.com>
parents:
9813
diff
changeset
|
1435 MAPPER_FORWARD (erfinv) |
14770
cb85e836d035
New function: erfcinv (bug #36607)
Axel Mathéi <axel.mathei@gmail.com>
parents:
14557
diff
changeset
|
1436 MAPPER_FORWARD (erfcinv) |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1437 MAPPER_FORWARD (erfc) |
10391
59e34bcdff13
implement built-in erfcx
Jaroslav Hajek <highegg@gmail.com>
parents:
10325
diff
changeset
|
1438 MAPPER_FORWARD (erfcx) |
15696
2fac72a256ce
Add complex erf,erfc,erfcx,erfi,dawson routines from Faddeeva package.
Steven G. Johnson <stevenj@alum.mit.edu>
parents:
15487
diff
changeset
|
1439 MAPPER_FORWARD (erfi) |
2fac72a256ce
Add complex erf,erfc,erfcx,erfi,dawson routines from Faddeeva package.
Steven G. Johnson <stevenj@alum.mit.edu>
parents:
15487
diff
changeset
|
1440 MAPPER_FORWARD (dawson) |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1441 MAPPER_FORWARD (exp) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1442 MAPPER_FORWARD (expm1) |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
1443 MAPPER_FORWARD (isfinite) |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1444 MAPPER_FORWARD (fix) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1445 MAPPER_FORWARD (floor) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1446 MAPPER_FORWARD (gamma) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1447 MAPPER_FORWARD (imag) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1448 MAPPER_FORWARD (isinf) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1449 MAPPER_FORWARD (isna) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1450 MAPPER_FORWARD (isnan) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1451 MAPPER_FORWARD (lgamma) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1452 MAPPER_FORWARD (log) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1453 MAPPER_FORWARD (log2) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1454 MAPPER_FORWARD (log10) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1455 MAPPER_FORWARD (log1p) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1456 MAPPER_FORWARD (real) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1457 MAPPER_FORWARD (round) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1458 MAPPER_FORWARD (roundb) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1459 MAPPER_FORWARD (signum) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1460 MAPPER_FORWARD (sin) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1461 MAPPER_FORWARD (sinh) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1462 MAPPER_FORWARD (sqrt) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1463 MAPPER_FORWARD (tan) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1464 MAPPER_FORWARD (tanh) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1465 |
21013
7f4c6d594e3d
Finish renaming mapper function finite to isfinite.
Rik <rik@octave.org>
parents:
21012
diff
changeset
|
1466 // These functions are prefixed with X to avoid potential macro conflicts. |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1467 |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1468 MAPPER_FORWARD (xisalnum) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1469 MAPPER_FORWARD (xisalpha) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1470 MAPPER_FORWARD (xisascii) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1471 MAPPER_FORWARD (xiscntrl) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1472 MAPPER_FORWARD (xisdigit) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1473 MAPPER_FORWARD (xisgraph) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1474 MAPPER_FORWARD (xislower) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1475 MAPPER_FORWARD (xisprint) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1476 MAPPER_FORWARD (xispunct) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1477 MAPPER_FORWARD (xisspace) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1478 MAPPER_FORWARD (xisupper) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1479 MAPPER_FORWARD (xisxdigit) |
15487
ecf5be238b4a
provide signbit mapper for real values
John W. Eaton <jwe@octave.org>
parents:
15429
diff
changeset
|
1480 MAPPER_FORWARD (xsignbit) |
9813
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1481 MAPPER_FORWARD (xtolower) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1482 MAPPER_FORWARD (xtoupper) |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1483 |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1484 #undef MAPPER_FORWARD |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1485 |
8fa32b527d9a
improve & partially revert previous change
Jaroslav Hajek <highegg@gmail.com>
parents:
9812
diff
changeset
|
1486 octave_value map (octave_base_value::unary_mapper_t umap) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1487 { return rep->map (umap); } |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
1488 |
27216
823b4bcf79fc
unless necessary for formatting or code, use ' instead of `
John W. Eaton <jwe@octave.org>
parents:
26922
diff
changeset
|
1489 //! Extract the n-th element, aka 'val(n)'. |
24624
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1490 //! |
27216
823b4bcf79fc
unless necessary for formatting or code, use ' instead of `
John W. Eaton <jwe@octave.org>
parents:
26922
diff
changeset
|
1491 //! @return Result is undefined if 'val' is not an array type |
24624
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1492 //! or @p n is out of range. |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1493 //! |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1494 //! @warning Function calls should never error. |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1495 |
10670
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10614
diff
changeset
|
1496 octave_value |
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10614
diff
changeset
|
1497 fast_elem_extract (octave_idx_type n) const |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1498 { return rep->fast_elem_extract (n); } |
10670
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10614
diff
changeset
|
1499 |
27216
823b4bcf79fc
unless necessary for formatting or code, use ' instead of `
John W. Eaton <jwe@octave.org>
parents:
26922
diff
changeset
|
1500 //! Assign the n-th element, aka 'val(n) = x'. |
24624
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1501 //! |
27216
823b4bcf79fc
unless necessary for formatting or code, use ' instead of `
John W. Eaton <jwe@octave.org>
parents:
26922
diff
changeset
|
1502 //! @returns false if 'val' is not an array type, |
24624
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1503 //! @p x is not a matching scalar type, |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1504 //! or @p n is out of range. |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1505 //! |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1506 //! @warning Function calls should never error. |
ce2eb28e0a6d
doc: make all Doxygen comment blocks more consistent
Mike Miller <mtmiller@octave.org>
parents:
24620
diff
changeset
|
1507 |
24040
8e8dbabd6e84
ov.h(fast_elem_insert): Remove "virtual" declaration.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
23913
diff
changeset
|
1508 bool |
10670
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10614
diff
changeset
|
1509 fast_elem_insert (octave_idx_type n, const octave_value& x) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1510 { |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1511 make_unique (); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1512 return rep->fast_elem_insert (n, x); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1513 } |
10670
654fbde5dceb
make cellfun's fast scalar collection mechanism public
Jaroslav Hajek <highegg@gmail.com>
parents:
10614
diff
changeset
|
1514 |
2376 | 1515 protected: |
1516 | |
24040
8e8dbabd6e84
ov.h(fast_elem_insert): Remove "virtual" declaration.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
23913
diff
changeset
|
1517 //! The real representation. |
5759 | 1518 octave_base_value *rep; |
2413 | 1519 |
3933 | 1520 private: |
2903 | 1521 |
21573
f3f8e1d3e399
avoid mulitple definitions of static function-scope vars (bug #47372)
John W. Eaton <jwe@octave.org>
parents:
20087
diff
changeset
|
1522 static octave_base_value *nil_rep (void); |
f3f8e1d3e399
avoid mulitple definitions of static function-scope vars (bug #47372)
John W. Eaton <jwe@octave.org>
parents:
20087
diff
changeset
|
1523 |
3205 | 1524 assign_op unary_op_to_assign_op (unary_op op); |
1525 | |
3204 | 1526 binary_op op_eq_to_binary_op (assign_op op); |
1527 | |
9521 | 1528 // This declaration protects against constructing octave_value from |
1529 // const octave_base_value* which actually silently calls octave_value (bool). | |
1530 octave_value (const octave_base_value *); | |
1531 | |
2376 | 1532 }; |
1533 | |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1534 // Non-member unary and binary operations on octave_value objects. |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1535 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1536 namespace octave |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1537 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1538 extern OCTINTERP_API octave_value |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28646
diff
changeset
|
1539 unary_op (type_info& ti, octave_value::unary_op op, |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1540 const octave_value& a); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1541 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1542 extern OCTINTERP_API octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1543 unary_op (octave_value::unary_op op, const octave_value& a); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1544 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1545 extern OCTINTERP_API octave_value |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28646
diff
changeset
|
1546 binary_op (type_info& ti, octave_value::binary_op op, |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1547 const octave_value& a, const octave_value& b); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1548 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1549 extern OCTINTERP_API octave_value |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28646
diff
changeset
|
1550 binary_op (type_info& ti, octave_value::compound_binary_op op, |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1551 const octave_value& a, const octave_value& b); |
24565
dbec1e04f499
accept type_info obj as arg to binary_op, unary_op, and cat_op functions
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
1552 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1553 extern OCTINTERP_API octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1554 binary_op (octave_value::binary_op op, const octave_value& a, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1555 const octave_value& b); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1556 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1557 extern OCTINTERP_API octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1558 binary_op (octave_value::compound_binary_op op, const octave_value& a, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1559 const octave_value& b); |
5508 | 1560 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1561 extern OCTINTERP_API octave_value |
28857
43ad651cf5a0
eliminate unnecessary uses of octave:: namespace qualifier
John W. Eaton <jwe@octave.org>
parents:
28646
diff
changeset
|
1562 cat_op (type_info& ti, const octave_value& a, |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1563 const octave_value& b, const Array<octave_idx_type>& ra_idx); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1564 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1565 extern OCTINTERP_API octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1566 cat_op (const octave_value& a, const octave_value& b, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1567 const Array<octave_idx_type>& ra_idx); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1568 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1569 extern OCTINTERP_API octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1570 colon_op (const octave_value& base, const octave_value& increment, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1571 const octave_value& limit, bool is_for_cmd_expr = false); |
5508 | 1572 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1573 inline octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1574 colon_op (const octave_value& base, const octave_value& limit, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1575 bool is_for_cmd_expr = false) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1576 { |
28633
c897ec8fb5d1
refactor octave_value colon_op function
John W. Eaton <jwe@octave.org>
parents:
28631
diff
changeset
|
1577 // Note, we need to pass an undefined octave_value object instead of |
c897ec8fb5d1
refactor octave_value colon_op function
John W. Eaton <jwe@octave.org>
parents:
28631
diff
changeset
|
1578 // octave_value (1.0) so that we can properly detect the |
c897ec8fb5d1
refactor octave_value colon_op function
John W. Eaton <jwe@octave.org>
parents:
28631
diff
changeset
|
1579 // two-argument case and correctly pass just two arguments to any |
c897ec8fb5d1
refactor octave_value colon_op function
John W. Eaton <jwe@octave.org>
parents:
28631
diff
changeset
|
1580 // user-defined function that is provided if either base or limit is |
c897ec8fb5d1
refactor octave_value colon_op function
John W. Eaton <jwe@octave.org>
parents:
28631
diff
changeset
|
1581 // an object. |
c897ec8fb5d1
refactor octave_value colon_op function
John W. Eaton <jwe@octave.org>
parents:
28631
diff
changeset
|
1582 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1583 return colon_op (base, octave_value (), limit, is_for_cmd_expr); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1584 } |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1585 } |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1586 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1587 OCTAVE_DEPRECATED (7, "use 'octave::unary_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1588 inline octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1589 do_unary_op (octave::type_info& ti, octave_value::unary_op op, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1590 const octave_value& a) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1591 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1592 return octave::unary_op (ti, op, a); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1593 } |
24565
dbec1e04f499
accept type_info obj as arg to binary_op, unary_op, and cat_op functions
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
1594 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1595 OCTAVE_DEPRECATED (7, "use 'octave::unary_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1596 inline octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1597 do_unary_op (octave_value::unary_op op, const octave_value& a) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1598 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1599 return octave::unary_op (op, a); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1600 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1601 } |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1602 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1603 inline octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1604 do_binary_op (octave::type_info& ti, octave_value::binary_op op, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1605 const octave_value& a, const octave_value& b) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1606 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1607 return octave::binary_op (ti, op, a, b); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1608 } |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1609 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1610 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1611 inline octave_value |
24565
dbec1e04f499
accept type_info obj as arg to binary_op, unary_op, and cat_op functions
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
1612 do_binary_op (octave::type_info& ti, octave_value::compound_binary_op op, |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1613 const octave_value& a, const octave_value& b) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1614 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1615 return octave::binary_op (ti, op, a, b); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1616 } |
5508 | 1617 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1618 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1619 inline octave_value |
24565
dbec1e04f499
accept type_info obj as arg to binary_op, unary_op, and cat_op functions
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
1620 do_binary_op (octave_value::binary_op op, const octave_value& a, |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1621 const octave_value& b) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1622 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1623 return octave::binary_op (op, a, b); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1624 } |
24565
dbec1e04f499
accept type_info obj as arg to binary_op, unary_op, and cat_op functions
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
1625 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1626 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1627 inline octave_value |
24565
dbec1e04f499
accept type_info obj as arg to binary_op, unary_op, and cat_op functions
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
1628 do_binary_op (octave_value::compound_binary_op op, const octave_value& a, |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1629 const octave_value& b) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1630 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1631 return octave::binary_op (op, a, b); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1632 } |
24565
dbec1e04f499
accept type_info obj as arg to binary_op, unary_op, and cat_op functions
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
1633 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1634 OCTAVE_DEPRECATED (7, "use 'octave::cat_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1635 inline octave_value |
24565
dbec1e04f499
accept type_info obj as arg to binary_op, unary_op, and cat_op functions
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
1636 do_cat_op (octave::type_info& ti, const octave_value& a, |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1637 const octave_value& b, const Array<octave_idx_type>& ra_idx) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1638 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1639 return octave::cat_op (ti, a, b, ra_idx); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1640 } |
24565
dbec1e04f499
accept type_info obj as arg to binary_op, unary_op, and cat_op functions
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
1641 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1642 OCTAVE_DEPRECATED (7, "use 'octave::cat_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1643 inline octave_value |
24565
dbec1e04f499
accept type_info obj as arg to binary_op, unary_op, and cat_op functions
John W. Eaton <jwe@octave.org>
parents:
24540
diff
changeset
|
1644 do_cat_op (const octave_value& a, const octave_value& b, |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1645 const Array<octave_idx_type>& ra_idx) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1646 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1647 return octave::cat_op (a, b, ra_idx); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1648 } |
7800
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
1649 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1650 OCTAVE_DEPRECATED (7, "use 'octave::colon_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1651 inline octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1652 do_colon_op (const octave_value& base, const octave_value& increment, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1653 const octave_value& limit, bool is_for_cmd_expr = false) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1654 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1655 return octave::colon_op (base, increment, limit, is_for_cmd_expr); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1656 } |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1657 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1658 OCTAVE_DEPRECATED (7, "use 'octave::colon_op' instead") |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1659 inline octave_value |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1660 do_colon_op (const octave_value& base, const octave_value& limit, |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1661 bool is_for_cmd_expr = false) |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1662 { |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1663 return octave::colon_op (base, limit, is_for_cmd_expr); |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1664 } |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1665 |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1666 #define OV_UNOP_FN(name) \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1667 inline octave_value \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1668 name (const octave_value& a) \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1669 { \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1670 return octave::unary_op (octave_value::name, a); \ |
3203 | 1671 } |
1672 | |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1673 #define OV_UNOP_OP(name, op) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1674 inline octave_value \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1675 operator op (const octave_value& a) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1676 { \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1677 return name (a); \ |
3203 | 1678 } |
1679 | |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1680 #define OV_UNOP_FN_OP(name, op) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1681 OV_UNOP_FN (name) \ |
3203 | 1682 OV_UNOP_OP (name, op) |
1683 | |
3525 | 1684 OV_UNOP_FN_OP (op_not, !) |
6518 | 1685 OV_UNOP_FN_OP (op_uplus, +) |
3525 | 1686 OV_UNOP_FN_OP (op_uminus, -) |
3203 | 1687 |
3525 | 1688 OV_UNOP_FN (op_transpose) |
1689 OV_UNOP_FN (op_hermitian) | |
3203 | 1690 |
1691 // No simple way to define these for prefix and suffix ops? | |
1692 // | |
1693 // incr | |
1694 // decr | |
1695 | |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1696 #define OV_BINOP_FN(name) \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1697 inline octave_value \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1698 name (const octave_value& a1, const octave_value& a2) \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1699 { \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1700 return octave::binary_op (octave_value::name, a1, a2); \ |
3203 | 1701 } |
1702 | |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1703 #define OV_BINOP_OP(name, op) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1704 inline octave_value \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1705 operator op (const octave_value& a1, const octave_value& a2) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1706 { \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1707 return name (a1, a2); \ |
3203 | 1708 } |
1709 | |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1710 #define OV_BINOP_FN_OP(name, op) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1711 OV_BINOP_FN (name) \ |
3203 | 1712 OV_BINOP_OP (name, op) |
1713 | |
3525 | 1714 OV_BINOP_FN_OP (op_add, +) |
1715 OV_BINOP_FN_OP (op_sub, -) | |
1716 OV_BINOP_FN_OP (op_mul, *) | |
1717 OV_BINOP_FN_OP (op_div, /) | |
3203 | 1718 |
3525 | 1719 OV_BINOP_FN (op_pow) |
1720 OV_BINOP_FN (op_ldiv) | |
3203 | 1721 |
3525 | 1722 OV_BINOP_FN_OP (op_lt, <) |
1723 OV_BINOP_FN_OP (op_le, <=) | |
1724 OV_BINOP_FN_OP (op_eq, ==) | |
1725 OV_BINOP_FN_OP (op_ge, >=) | |
1726 OV_BINOP_FN_OP (op_gt, >) | |
1727 OV_BINOP_FN_OP (op_ne, !=) | |
3203 | 1728 |
3525 | 1729 OV_BINOP_FN (op_el_mul) |
1730 OV_BINOP_FN (op_el_div) | |
1731 OV_BINOP_FN (op_el_pow) | |
1732 OV_BINOP_FN (op_el_ldiv) | |
1733 OV_BINOP_FN (op_el_and) | |
1734 OV_BINOP_FN (op_el_or) | |
3203 | 1735 |
3525 | 1736 OV_BINOP_FN (op_struct_ref) |
3203 | 1737 |
28631
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1738 #define OV_COMP_BINOP_FN(name) \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1739 inline octave_value \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1740 name (const octave_value& a1, const octave_value& a2) \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1741 { \ |
70cdf8de553d
move non-member octave_value operator functions to octave namespace
John W. Eaton <jwe@octave.org>
parents:
28588
diff
changeset
|
1742 return octave::binary_op (octave_value::name, a1, a2); \ |
7800
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
1743 } |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
1744 |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
1745 OV_COMP_BINOP_FN (op_trans_mul) |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
1746 OV_COMP_BINOP_FN (op_mul_trans) |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
1747 OV_COMP_BINOP_FN (op_herm_mul) |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
1748 OV_COMP_BINOP_FN (op_mul_herm) |
5861b95e9879
support for compound operators, implement trans_mul, mul_trans, herm_mul and mul_herm
Jaroslav Hajek <highegg@gmail.com>
parents:
7789
diff
changeset
|
1749 |
24540
46440078d73b
don't use singleton for octave_value_typeinfo
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
1750 extern OCTINTERP_API void install_types (octave::type_info&); |
2376 | 1751 |
9657
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1752 // Templated value extractors. |
21139
538b57866b90
consistently use "typename" intead of "class" in template declarations
John W. Eaton <jwe@octave.org>
parents:
21134
diff
changeset
|
1753 template <typename Value> |
9657
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1754 inline Value octave_value_extract (const octave_value&) |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1755 { assert (false); } |
9657
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1756 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1757 #define DEF_VALUE_EXTRACTOR(VALUE,MPREFIX) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1758 template <> \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1759 inline VALUE octave_value_extract<VALUE> (const octave_value& v) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1760 { \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1761 return v.MPREFIX ## _value (); \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1762 } |
9657
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1763 |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1764 DEF_VALUE_EXTRACTOR (double, scalar) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1765 DEF_VALUE_EXTRACTOR (float, float_scalar) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1766 DEF_VALUE_EXTRACTOR (Complex, complex) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1767 DEF_VALUE_EXTRACTOR (FloatComplex, float_complex) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1768 DEF_VALUE_EXTRACTOR (bool, bool) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1769 |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1770 DEF_VALUE_EXTRACTOR (octave_int8, int8_scalar) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1771 DEF_VALUE_EXTRACTOR (octave_int16, int16_scalar) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1772 DEF_VALUE_EXTRACTOR (octave_int32, int32_scalar) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1773 DEF_VALUE_EXTRACTOR (octave_int64, int64_scalar) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1774 DEF_VALUE_EXTRACTOR (octave_uint8, uint8_scalar) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1775 DEF_VALUE_EXTRACTOR (octave_uint16, uint16_scalar) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1776 DEF_VALUE_EXTRACTOR (octave_uint32, uint32_scalar) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1777 DEF_VALUE_EXTRACTOR (octave_uint64, uint64_scalar) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1778 |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1779 DEF_VALUE_EXTRACTOR (NDArray, array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1780 DEF_VALUE_EXTRACTOR (FloatNDArray, float_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1781 DEF_VALUE_EXTRACTOR (ComplexNDArray, complex_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1782 DEF_VALUE_EXTRACTOR (FloatComplexNDArray, float_complex_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1783 DEF_VALUE_EXTRACTOR (boolNDArray, bool_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1784 |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1785 DEF_VALUE_EXTRACTOR (charNDArray, char_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1786 DEF_VALUE_EXTRACTOR (int8NDArray, int8_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1787 DEF_VALUE_EXTRACTOR (int16NDArray, int16_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1788 DEF_VALUE_EXTRACTOR (int32NDArray, int32_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1789 DEF_VALUE_EXTRACTOR (int64NDArray, int64_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1790 DEF_VALUE_EXTRACTOR (uint8NDArray, uint8_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1791 DEF_VALUE_EXTRACTOR (uint16NDArray, uint16_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1792 DEF_VALUE_EXTRACTOR (uint32NDArray, uint32_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1793 DEF_VALUE_EXTRACTOR (uint64NDArray, uint64_array) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1794 |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1795 DEF_VALUE_EXTRACTOR (Matrix, matrix) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1796 DEF_VALUE_EXTRACTOR (FloatMatrix, float_matrix) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1797 DEF_VALUE_EXTRACTOR (ComplexMatrix, complex_matrix) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1798 DEF_VALUE_EXTRACTOR (FloatComplexMatrix, float_complex_matrix) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1799 DEF_VALUE_EXTRACTOR (boolMatrix, bool_matrix) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1800 |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1801 DEF_VALUE_EXTRACTOR (ColumnVector, column_vector) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1802 DEF_VALUE_EXTRACTOR (FloatColumnVector, float_column_vector) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1803 DEF_VALUE_EXTRACTOR (ComplexColumnVector, complex_column_vector) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1804 DEF_VALUE_EXTRACTOR (FloatComplexColumnVector, float_complex_column_vector) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1805 |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1806 DEF_VALUE_EXTRACTOR (RowVector, row_vector) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1807 DEF_VALUE_EXTRACTOR (FloatRowVector, float_row_vector) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1808 DEF_VALUE_EXTRACTOR (ComplexRowVector, complex_row_vector) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1809 DEF_VALUE_EXTRACTOR (FloatComplexRowVector, float_complex_row_vector) |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1810 |
9685 | 1811 DEF_VALUE_EXTRACTOR (DiagMatrix, diag_matrix) |
1812 DEF_VALUE_EXTRACTOR (FloatDiagMatrix, float_diag_matrix) | |
1813 DEF_VALUE_EXTRACTOR (ComplexDiagMatrix, complex_diag_matrix) | |
1814 DEF_VALUE_EXTRACTOR (FloatComplexDiagMatrix, float_complex_diag_matrix) | |
1815 DEF_VALUE_EXTRACTOR (PermMatrix, perm_matrix) | |
1816 | |
9789
97f5de91427b
support sparse templated extractors
Jaroslav Hajek <highegg@gmail.com>
parents:
9732
diff
changeset
|
1817 DEF_VALUE_EXTRACTOR (SparseMatrix, sparse_matrix) |
97f5de91427b
support sparse templated extractors
Jaroslav Hajek <highegg@gmail.com>
parents:
9732
diff
changeset
|
1818 DEF_VALUE_EXTRACTOR (SparseComplexMatrix, sparse_complex_matrix) |
97f5de91427b
support sparse templated extractors
Jaroslav Hajek <highegg@gmail.com>
parents:
9732
diff
changeset
|
1819 DEF_VALUE_EXTRACTOR (SparseBoolMatrix, sparse_bool_matrix) |
9657
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1820 #undef DEF_VALUE_EXTRACTOR |
3c1c3a38ec7b
implement templated octave_value extractor
Jaroslav Hajek <highegg@gmail.com>
parents:
9607
diff
changeset
|
1821 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1822 #define DEF_DUMMY_VALUE_EXTRACTOR(VALUE,DEFVAL) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1823 template <> \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1824 inline VALUE octave_value_extract<VALUE> (const octave_value&) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1825 { \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1826 assert (false); \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1827 return DEFVAL; \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
22022
diff
changeset
|
1828 } |
13733
b1186adb567e
Add dummy template specializations with a return value.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13294
diff
changeset
|
1829 |
b1186adb567e
Add dummy template specializations with a return value.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13294
diff
changeset
|
1830 DEF_DUMMY_VALUE_EXTRACTOR (char, 0) |
b1186adb567e
Add dummy template specializations with a return value.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13294
diff
changeset
|
1831 DEF_DUMMY_VALUE_EXTRACTOR (octave_value, octave_value ()) |
b1186adb567e
Add dummy template specializations with a return value.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13294
diff
changeset
|
1832 #undef DEF_DUMMY_VALUE_EXTRACTOR |
b1186adb567e
Add dummy template specializations with a return value.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
13294
diff
changeset
|
1833 |
2376 | 1834 #endif |