Mercurial > octave-nkf
annotate src/ov-base.cc @ 7948:af10baa63915 ss-3-1-50
3.1.50 snapshot
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 18 Jul 2008 17:42:48 -0400 |
parents | f336dd8e96d0 |
children | c777f3ce02d8 |
rev | line source |
---|---|
2376 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, |
4 2006, 2007 John W. Eaton | |
2376 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
2376 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
2376 | 21 |
22 */ | |
23 | |
24 #ifdef HAVE_CONFIG_H | |
25 #include <config.h> | |
26 #endif | |
27 | |
4254 | 28 #include <climits> |
29 | |
3503 | 30 #include <iostream> |
2901 | 31 |
2376 | 32 #include "lo-ieee.h" |
4732 | 33 #include "lo-mappers.h" |
2376 | 34 |
5759 | 35 #include "defun.h" |
2376 | 36 #include "gripes.h" |
37 #include "oct-map.h" | |
2974 | 38 #include "oct-obj.h" |
2979 | 39 #include "oct-lvalue.h" |
3340 | 40 #include "oct-stream.h" |
2376 | 41 #include "ops.h" |
42 #include "ov-base.h" | |
3928 | 43 #include "ov-cell.h" |
44 #include "ov-ch-mat.h" | |
2376 | 45 #include "ov-complex.h" |
46 #include "ov-cx-mat.h" | |
3928 | 47 #include "ov-list.h" |
48 #include "ov-range.h" | |
49 #include "ov-re-mat.h" | |
50 #include "ov-scalar.h" | |
2376 | 51 #include "ov-str-mat.h" |
4343 | 52 #include "ov-fcn-handle.h" |
5759 | 53 #include "parse.h" |
54 #include "utils.h" | |
2948 | 55 #include "variables.h" |
2376 | 56 |
4612 | 57 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_base_value, |
58 "<unknown type>", "unknown"); | |
2376 | 59 |
5759 | 60 // If TRUE, turn off printing of results in functions (as if a |
61 // semicolon has been appended to each statement). | |
7336 | 62 bool Vsilent_functions = false; |
5759 | 63 |
7193 | 64 // TRUE means to perform automatic sparse to real mutation if there |
65 // is memory to be saved | |
66 bool Vsparse_auto_mutate = false; | |
67 | |
2376 | 68 octave_value |
4532 | 69 octave_base_value::squeeze (void) const |
70 { | |
71 std::string nm = type_name (); | |
72 error ("squeeze: invalid operation for %s type", nm.c_str ()); | |
73 return octave_value (); | |
74 } | |
75 | |
76 octave_value | |
4247 | 77 octave_base_value::subsref (const std::string&, |
4219 | 78 const std::list<octave_value_list>&) |
3933 | 79 { |
80 std::string nm = type_name (); | |
81 error ("can't perform indexing operations for %s type", nm.c_str ()); | |
82 return octave_value (); | |
83 } | |
84 | |
85 octave_value_list | |
4247 | 86 octave_base_value::subsref (const std::string&, |
4219 | 87 const std::list<octave_value_list>&, int) |
3933 | 88 { |
89 std::string nm = type_name (); | |
90 error ("can't perform indexing operations for %s type", nm.c_str ()); | |
91 return octave_value (); | |
92 } | |
93 | |
94 octave_value | |
5885 | 95 octave_base_value::do_index_op (const octave_value_list&, bool) |
2974 | 96 { |
3523 | 97 std::string nm = type_name (); |
2974 | 98 error ("can't perform indexing operations for %s type", nm.c_str ()); |
99 return octave_value (); | |
100 } | |
101 | |
102 octave_value_list | |
3544 | 103 octave_base_value::do_multi_index_op (int, const octave_value_list&) |
2376 | 104 { |
3523 | 105 std::string nm = type_name (); |
2376 | 106 error ("can't perform indexing operations for %s type", nm.c_str ()); |
107 return octave_value (); | |
108 } | |
109 | |
110 idx_vector | |
111 octave_base_value::index_vector (void) const | |
112 { | |
3523 | 113 std::string nm = type_name (); |
2376 | 114 error ("%s type invalid as index value", nm.c_str ()); |
115 return idx_vector (); | |
116 } | |
117 | |
5759 | 118 int |
119 octave_base_value::ndims (void) const | |
120 { | |
121 dim_vector dv = dims (); | |
122 | |
123 int n_dims = dv.length (); | |
124 | |
125 // Remove trailing singleton dimensions. | |
126 | |
127 for (int i = n_dims; i > 2; i--) | |
128 { | |
129 if (dv(i-1) == 1) | |
130 n_dims--; | |
131 else | |
132 break; | |
133 } | |
134 | |
135 // The result is always >= 2. | |
136 | |
137 if (n_dims < 2) | |
138 n_dims = 2; | |
139 | |
140 return n_dims; | |
141 } | |
142 | |
2376 | 143 octave_value |
4247 | 144 octave_base_value::subsasgn (const std::string& type, |
4219 | 145 const std::list<octave_value_list>& idx, |
3933 | 146 const octave_value& rhs) |
2376 | 147 { |
3933 | 148 octave_value retval; |
2376 | 149 |
3933 | 150 if (is_defined ()) |
151 { | |
4139 | 152 if (is_numeric_type ()) |
153 { | |
154 switch (type[0]) | |
155 { | |
156 case '(': | |
157 { | |
158 if (type.length () == 1) | |
159 retval = numeric_assign (type, idx, rhs); | |
4436 | 160 else if (is_empty ()) |
161 { | |
162 // Allow conversion of empty matrix to some other | |
163 // type in cases like | |
164 // | |
165 // x = []; x(i).f = rhs | |
166 | |
167 octave_value tmp = octave_value::empty_conv (type, rhs); | |
168 | |
169 retval = tmp.subsasgn (type, idx, rhs); | |
170 } | |
4139 | 171 else |
172 { | |
173 std::string nm = type_name (); | |
174 error ("in indexed assignment of %s, last rhs index must be ()", | |
175 nm.c_str ()); | |
176 } | |
177 } | |
178 break; | |
179 | |
180 case '{': | |
181 case '.': | |
182 { | |
183 std::string nm = type_name (); | |
184 error ("%s cannot be indexed with %c", nm.c_str (), type[0]); | |
185 } | |
186 break; | |
187 | |
188 default: | |
189 panic_impossible (); | |
190 } | |
191 } | |
192 else | |
193 { | |
194 std::string nm = type_name (); | |
195 error ("can't perform indexed assignment for %s type", nm.c_str ()); | |
196 } | |
3933 | 197 } |
198 else | |
199 { | |
200 // Create new object of appropriate type for given index and rhs | |
201 // types and then call subsasgn again for that object. | |
202 | |
203 octave_value tmp = octave_value::empty_conv (type, rhs); | |
204 | |
205 retval = tmp.subsasgn (type, idx, rhs); | |
206 } | |
207 | |
208 return retval; | |
2376 | 209 } |
210 | |
5602 | 211 octave_idx_type |
212 octave_base_value::nnz (void) const | |
213 { | |
214 gripe_wrong_type_arg ("octave_base_value::nnz ()", type_name ()); | |
215 return -1; | |
216 } | |
217 | |
5604 | 218 octave_idx_type |
219 octave_base_value::nzmax (void) const | |
220 { | |
221 gripe_wrong_type_arg ("octave_base_value::nzmax ()", type_name ()); | |
222 return -1; | |
223 } | |
224 | |
5900 | 225 octave_idx_type |
226 octave_base_value::nfields (void) const | |
227 { | |
228 gripe_wrong_type_arg ("octave_base_value::nfields ()", type_name ()); | |
229 return -1; | |
230 } | |
231 | |
2376 | 232 octave_value |
4567 | 233 octave_base_value::reshape (const dim_vector&) const |
234 { | |
235 gripe_wrong_type_arg ("octave_base_value::reshape ()", type_name ()); | |
236 return octave_value (); | |
237 } | |
238 | |
239 octave_value | |
4593 | 240 octave_base_value::permute (const Array<int>&, bool) const |
241 { | |
242 gripe_wrong_type_arg ("octave_base_value::permute ()", type_name ()); | |
243 return octave_value (); | |
244 } | |
245 | |
246 octave_value | |
5731 | 247 octave_base_value::resize (const dim_vector&, bool) const |
4915 | 248 { |
249 gripe_wrong_type_arg ("octave_base_value::resize ()", type_name ()); | |
250 return octave_value (); | |
251 } | |
252 | |
5785 | 253 MatrixType |
254 octave_base_value::matrix_type (void) const | |
255 { | |
256 gripe_wrong_type_arg ("octave_base_value::matrix_type ()", type_name ()); | |
257 return MatrixType (); | |
258 } | |
259 | |
260 MatrixType | |
261 octave_base_value::matrix_type (const MatrixType&) const | |
262 { | |
263 gripe_wrong_type_arg ("octave_base_value::matrix_type ()", type_name ()); | |
264 return MatrixType (); | |
265 } | |
266 | |
4915 | 267 octave_value |
5759 | 268 octave_base_value::all (int) const |
269 { | |
270 return 0.0; | |
271 } | |
272 | |
273 octave_value | |
274 octave_base_value::any (int) const | |
275 { | |
276 return 0.0; | |
277 } | |
278 | |
279 octave_value | |
280 octave_base_value::convert_to_str (bool pad, bool force, char type) const | |
281 { | |
282 octave_value retval = convert_to_str_internal (pad, force, type); | |
283 | |
5781 | 284 if (! force && is_numeric_type ()) |
285 gripe_implicit_conversion ("Octave:num-to-str", | |
286 type_name (), retval.type_name ()); | |
5759 | 287 |
288 return retval; | |
289 } | |
290 | |
291 octave_value | |
5279 | 292 octave_base_value::convert_to_str_internal (bool, bool, char) const |
2376 | 293 { |
4452 | 294 gripe_wrong_type_arg ("octave_base_value::convert_to_str_internal ()", |
2376 | 295 type_name ()); |
296 return octave_value (); | |
297 } | |
298 | |
299 void | |
300 octave_base_value::convert_to_row_or_column_vector (void) | |
301 { | |
302 gripe_wrong_type_arg | |
303 ("octave_base_value::convert_to_row_or_column_vector ()", | |
304 type_name ()); | |
305 } | |
306 | |
307 void | |
3523 | 308 octave_base_value::print (std::ostream&, bool) const |
2376 | 309 { |
3195 | 310 gripe_wrong_type_arg ("octave_base_value::print ()", type_name ()); |
2376 | 311 } |
312 | |
2901 | 313 void |
3523 | 314 octave_base_value::print_raw (std::ostream&, bool) const |
2901 | 315 { |
3195 | 316 gripe_wrong_type_arg ("octave_base_value::print_raw ()", type_name ()); |
2901 | 317 } |
318 | |
319 bool | |
3523 | 320 octave_base_value::print_name_tag (std::ostream& os, const std::string& name) const |
2901 | 321 { |
4604 | 322 bool retval = false; |
323 | |
2901 | 324 indent (os); |
4604 | 325 |
326 if (print_as_scalar ()) | |
327 os << name << " = "; | |
328 else | |
329 { | |
330 os << name << " ="; | |
331 newline (os); | |
332 newline (os); | |
333 retval = true; | |
334 } | |
335 | |
336 return retval; | |
2901 | 337 } |
338 | |
3933 | 339 void |
5759 | 340 octave_base_value::print_with_name (std::ostream& output_buf, |
341 const std::string& name, | |
342 bool print_padding) const | |
343 { | |
344 if (! (evaluating_function_body && Vsilent_functions)) | |
345 { | |
7336 | 346 bool pad_after = print_name_tag (output_buf, name); |
5759 | 347 |
348 print (output_buf); | |
349 | |
350 if (print_padding && pad_after) | |
351 newline (output_buf); | |
352 } | |
353 } | |
354 | |
355 void | |
3933 | 356 octave_base_value::print_info (std::ostream& os, |
4661 | 357 const std::string& /* prefix */) const |
3933 | 358 { |
359 os << "no info for type: " << type_name () << "\n"; | |
360 } | |
361 | |
4254 | 362 #define INT_CONV_METHOD(T, F, MIN_LIMIT, MAX_LIMIT) \ |
363 T \ | |
364 octave_base_value::F ## _value (bool require_int, bool frc_str_conv) const \ | |
365 { \ | |
366 T retval = 0; \ | |
367 \ | |
368 double d = double_value (frc_str_conv); \ | |
369 \ | |
370 if (! error_state) \ | |
371 { \ | |
372 if (require_int && D_NINT (d) != d) \ | |
373 error ("conversion of %g to " #T " value failed", d); \ | |
5054 | 374 else if (d < MIN_LIMIT) \ |
375 retval = MIN_LIMIT; \ | |
376 else if (d > MAX_LIMIT) \ | |
377 retval = MAX_LIMIT; \ | |
4254 | 378 else \ |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
379 retval = static_cast<T> (::fix (d)); \ |
4254 | 380 } \ |
381 else \ | |
382 gripe_wrong_type_arg ("octave_base_value::" #F "_value ()", \ | |
383 type_name ()); \ | |
384 \ | |
385 return retval; \ | |
386 } | |
3202 | 387 |
4254 | 388 INT_CONV_METHOD (short int, short, SHRT_MIN, SHRT_MAX) |
389 INT_CONV_METHOD (unsigned short int, ushort, 0, USHRT_MAX) | |
3202 | 390 |
4254 | 391 INT_CONV_METHOD (int, int, INT_MIN, INT_MAX) |
392 INT_CONV_METHOD (unsigned int, uint, 0, UINT_MAX) | |
3202 | 393 |
4254 | 394 INT_CONV_METHOD (long int, long, LONG_MIN, LONG_MAX) |
395 INT_CONV_METHOD (unsigned long int, ulong, 0, ULONG_MAX) | |
3202 | 396 |
397 int | |
398 octave_base_value::nint_value (bool frc_str_conv) const | |
399 { | |
400 int retval = 0; | |
401 | |
402 double d = double_value (frc_str_conv); | |
403 | |
404 if (! error_state) | |
405 { | |
406 if (xisnan (d)) | |
407 { | |
408 error ("conversion of NaN to integer value failed"); | |
409 return retval; | |
410 } | |
411 | |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
412 retval = static_cast<int> (::fix (d)); |
3202 | 413 } |
414 else | |
415 gripe_wrong_type_arg ("octave_base_value::nint_value ()", type_name ()); | |
416 | |
417 return retval; | |
418 } | |
419 | |
2376 | 420 double |
421 octave_base_value::double_value (bool) const | |
422 { | |
4102 | 423 double retval = lo_ieee_nan_value (); |
2376 | 424 gripe_wrong_type_arg ("octave_base_value::double_value ()", type_name ()); |
425 return retval; | |
426 } | |
427 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
428 float |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
429 octave_base_value::float_value (bool) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
430 { |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
431 float retval = lo_ieee_float_nan_value (); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
432 gripe_wrong_type_arg ("octave_base_value::float_value ()", type_name ()); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
433 return retval; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
434 } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
435 |
3351 | 436 Cell |
3539 | 437 octave_base_value::cell_value () const |
3351 | 438 { |
439 Cell retval; | |
440 gripe_wrong_type_arg ("octave_base_value::cell_value()", type_name ()); | |
441 return retval; | |
442 } | |
443 | |
2376 | 444 Matrix |
445 octave_base_value::matrix_value (bool) const | |
446 { | |
447 Matrix retval; | |
448 gripe_wrong_type_arg ("octave_base_value::matrix_value()", type_name ()); | |
449 return retval; | |
450 } | |
451 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
452 FloatMatrix |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
453 octave_base_value::float_matrix_value (bool) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
454 { |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
455 FloatMatrix retval; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
456 gripe_wrong_type_arg ("octave_base_value::float_matrix_value()", type_name ()); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
457 return retval; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
458 } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
459 |
4507 | 460 NDArray |
4550 | 461 octave_base_value::array_value (bool) const |
4505 | 462 { |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
463 FloatNDArray retval; |
4550 | 464 gripe_wrong_type_arg ("octave_base_value::array_value()", type_name ()); |
4505 | 465 return retval; |
466 } | |
467 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
468 FloatNDArray |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
469 octave_base_value::float_array_value (bool) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
470 { |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
471 FloatNDArray retval; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
472 gripe_wrong_type_arg ("octave_base_value::float_array_value()", type_name ()); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
473 return retval; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
474 } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
475 |
2376 | 476 Complex |
477 octave_base_value::complex_value (bool) const | |
478 { | |
4102 | 479 double tmp = lo_ieee_nan_value (); |
480 Complex retval (tmp, tmp); | |
2376 | 481 gripe_wrong_type_arg ("octave_base_value::complex_value()", type_name ()); |
482 return retval; | |
483 } | |
484 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
485 FloatComplex |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
486 octave_base_value::float_complex_value (bool) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
487 { |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
488 float tmp = lo_ieee_float_nan_value (); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
489 FloatComplex retval (tmp, tmp); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
490 gripe_wrong_type_arg ("octave_base_value::float_complex_value()", type_name ()); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
491 return retval; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
492 } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
493 |
2376 | 494 ComplexMatrix |
495 octave_base_value::complex_matrix_value (bool) const | |
496 { | |
497 ComplexMatrix retval; | |
498 gripe_wrong_type_arg ("octave_base_value::complex_matrix_value()", | |
499 type_name ()); | |
500 return retval; | |
501 } | |
502 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
503 FloatComplexMatrix |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
504 octave_base_value::float_complex_matrix_value (bool) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
505 { |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
506 FloatComplexMatrix retval; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
507 gripe_wrong_type_arg ("octave_base_value::float_complex_matrix_value()", |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
508 type_name ()); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
509 return retval; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
510 } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
511 |
4550 | 512 ComplexNDArray |
513 octave_base_value::complex_array_value (bool) const | |
514 { | |
515 ComplexNDArray retval; | |
516 gripe_wrong_type_arg ("octave_base_value::complex_array_value()", | |
517 type_name ()); | |
518 return retval; | |
519 } | |
520 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
521 FloatComplexNDArray |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
522 octave_base_value::float_complex_array_value (bool) const |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
523 { |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
524 FloatComplexNDArray retval; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
525 gripe_wrong_type_arg ("octave_base_value::float_complex_array_value()", |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
526 type_name ()); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
527 return retval; |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
528 } |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7761
diff
changeset
|
529 |
4550 | 530 bool |
5943 | 531 octave_base_value::bool_value (bool) const |
4550 | 532 { |
533 bool retval = false; | |
534 gripe_wrong_type_arg ("octave_base_value::bool_value()", type_name ()); | |
535 return retval; | |
536 } | |
537 | |
538 boolMatrix | |
5943 | 539 octave_base_value::bool_matrix_value (bool) const |
4550 | 540 { |
541 boolMatrix retval; | |
542 gripe_wrong_type_arg ("octave_base_value::bool_matrix_value()", | |
543 type_name ()); | |
544 return retval; | |
545 } | |
546 | |
547 boolNDArray | |
5943 | 548 octave_base_value::bool_array_value (bool) const |
4550 | 549 { |
550 boolNDArray retval; | |
551 gripe_wrong_type_arg ("octave_base_value::bool_array_value()", | |
552 type_name ()); | |
553 return retval; | |
554 } | |
555 | |
2376 | 556 charMatrix |
4741 | 557 octave_base_value::char_matrix_value (bool force) const |
2376 | 558 { |
559 charMatrix retval; | |
4257 | 560 |
4741 | 561 octave_value tmp = convert_to_str (false, force); |
4257 | 562 |
4452 | 563 if (! error_state) |
564 retval = tmp.char_matrix_value (); | |
565 | |
2376 | 566 return retval; |
567 } | |
568 | |
4550 | 569 charNDArray |
570 octave_base_value::char_array_value (bool) const | |
571 { | |
572 charNDArray retval; | |
573 gripe_wrong_type_arg ("octave_base_value::char_array_value()", | |
574 type_name ()); | |
575 return retval; | |
576 } | |
577 | |
5164 | 578 SparseMatrix |
579 octave_base_value::sparse_matrix_value (bool) const | |
580 { | |
581 SparseMatrix retval; | |
582 gripe_wrong_type_arg ("octave_base_value::sparse_matrix_value()", type_name ()); | |
583 return retval; | |
584 } | |
585 | |
586 SparseComplexMatrix | |
587 octave_base_value::sparse_complex_matrix_value (bool) const | |
588 { | |
589 SparseComplexMatrix retval; | |
590 gripe_wrong_type_arg ("octave_base_value::sparse_complex_matrix_value()", type_name ()); | |
591 return retval; | |
592 } | |
593 | |
594 SparseBoolMatrix | |
595 octave_base_value::sparse_bool_matrix_value (bool) const | |
596 { | |
597 SparseBoolMatrix retval; | |
598 gripe_wrong_type_arg ("octave_base_value::sparse_bool_matrix_value()", type_name ()); | |
599 return retval; | |
600 } | |
601 | |
4910 | 602 octave_int8 |
603 octave_base_value::int8_scalar_value (void) const | |
604 { | |
605 octave_int8 retval; | |
606 gripe_wrong_type_arg ("octave_base_value::int8_scalar_value()", | |
607 type_name ()); | |
608 return retval; | |
609 } | |
610 | |
611 octave_int16 | |
612 octave_base_value::int16_scalar_value (void) const | |
613 { | |
614 octave_int16 retval; | |
615 gripe_wrong_type_arg ("octave_base_value::int16_scalar_value()", | |
616 type_name ()); | |
617 return retval; | |
618 } | |
619 | |
620 octave_int32 | |
621 octave_base_value::int32_scalar_value (void) const | |
622 { | |
623 octave_int32 retval; | |
624 gripe_wrong_type_arg ("octave_base_value::int32_scalar_value()", | |
625 type_name ()); | |
626 return retval; | |
627 } | |
628 | |
629 octave_int64 | |
630 octave_base_value::int64_scalar_value (void) const | |
631 { | |
632 octave_int64 retval; | |
633 gripe_wrong_type_arg ("octave_base_value::int64_scalar_value()", | |
634 type_name ()); | |
635 return retval; | |
636 } | |
637 | |
638 octave_uint8 | |
639 octave_base_value::uint8_scalar_value (void) const | |
640 { | |
641 octave_uint8 retval; | |
642 gripe_wrong_type_arg ("octave_base_value::uint8_scalar_value()", | |
643 type_name ()); | |
644 return retval; | |
645 } | |
646 | |
647 octave_uint16 | |
648 octave_base_value::uint16_scalar_value (void) const | |
649 { | |
650 octave_uint16 retval; | |
651 gripe_wrong_type_arg ("octave_base_value::uint16_scalar_value()", | |
652 type_name ()); | |
653 return retval; | |
654 } | |
655 | |
656 octave_uint32 | |
657 octave_base_value::uint32_scalar_value (void) const | |
658 { | |
659 octave_uint32 retval; | |
660 gripe_wrong_type_arg ("octave_base_value::uint32_scalar_value()", | |
661 type_name ()); | |
662 return retval; | |
663 } | |
664 | |
665 octave_uint64 | |
666 octave_base_value::uint64_scalar_value (void) const | |
667 { | |
668 octave_uint64 retval; | |
669 gripe_wrong_type_arg ("octave_base_value::uint64_scalar_value()", | |
670 type_name ()); | |
671 return retval; | |
672 } | |
673 | |
4906 | 674 int8NDArray |
675 octave_base_value::int8_array_value (void) const | |
676 { | |
677 int8NDArray retval; | |
678 gripe_wrong_type_arg ("octave_base_value::int8_array_value()", | |
679 type_name ()); | |
4910 | 680 return retval; |
4906 | 681 } |
682 | |
683 int16NDArray | |
684 octave_base_value::int16_array_value (void) const | |
685 { | |
686 int16NDArray retval; | |
687 gripe_wrong_type_arg ("octave_base_value::int16_array_value()", | |
688 type_name ()); | |
4910 | 689 return retval; |
4906 | 690 } |
691 | |
692 int32NDArray | |
693 octave_base_value::int32_array_value (void) const | |
694 { | |
695 int32NDArray retval; | |
696 gripe_wrong_type_arg ("octave_base_value::int32_array_value()", | |
697 type_name ()); | |
4910 | 698 return retval; |
4906 | 699 } |
700 | |
701 int64NDArray | |
702 octave_base_value::int64_array_value (void) const | |
703 { | |
704 int64NDArray retval; | |
705 gripe_wrong_type_arg ("octave_base_value::int64_array_value()", | |
706 type_name ()); | |
4910 | 707 return retval; |
4906 | 708 } |
709 | |
710 uint8NDArray | |
711 octave_base_value::uint8_array_value (void) const | |
712 { | |
713 uint8NDArray retval; | |
714 gripe_wrong_type_arg ("octave_base_value::uint8_array_value()", | |
715 type_name ()); | |
4910 | 716 return retval; |
4906 | 717 } |
718 | |
719 uint16NDArray | |
720 octave_base_value::uint16_array_value (void) const | |
721 { | |
722 uint16NDArray retval; | |
723 gripe_wrong_type_arg ("octave_base_value::uint16_array_value()", | |
724 type_name ()); | |
4910 | 725 return retval; |
4906 | 726 } |
727 | |
728 uint32NDArray | |
729 octave_base_value::uint32_array_value (void) const | |
730 { | |
731 uint32NDArray retval; | |
732 gripe_wrong_type_arg ("octave_base_value::uint32_array_value()", | |
733 type_name ()); | |
4910 | 734 return retval; |
4906 | 735 } |
736 | |
737 uint64NDArray | |
738 octave_base_value::uint64_array_value (void) const | |
739 { | |
740 uint64NDArray retval; | |
741 gripe_wrong_type_arg ("octave_base_value::uint64_array_value()", | |
742 type_name ()); | |
4910 | 743 return retval; |
4906 | 744 } |
745 | |
2493 | 746 string_vector |
5715 | 747 octave_base_value::all_strings (bool pad) const |
2376 | 748 { |
2493 | 749 string_vector retval; |
4257 | 750 |
5715 | 751 octave_value tmp = convert_to_str (pad, true); |
4257 | 752 |
4452 | 753 if (! error_state) |
754 retval = tmp.all_strings (); | |
4257 | 755 |
2376 | 756 return retval; |
757 } | |
758 | |
3536 | 759 std::string |
4457 | 760 octave_base_value::string_value (bool force) const |
2376 | 761 { |
3523 | 762 std::string retval; |
4257 | 763 |
4457 | 764 octave_value tmp = convert_to_str (force); |
4257 | 765 |
4452 | 766 if (! error_state) |
767 retval = tmp.string_value (); | |
4257 | 768 |
2376 | 769 return retval; |
770 } | |
771 | |
772 Range | |
773 octave_base_value::range_value (void) const | |
774 { | |
775 Range retval; | |
776 gripe_wrong_type_arg ("octave_base_value::range_value()", type_name ()); | |
777 return retval; | |
778 } | |
779 | |
780 Octave_map | |
781 octave_base_value::map_value (void) const | |
782 { | |
783 Octave_map retval; | |
784 gripe_wrong_type_arg ("octave_base_value::map_value()", type_name ()); | |
785 return retval; | |
786 } | |
787 | |
3933 | 788 string_vector |
789 octave_base_value::map_keys (void) const | |
790 { | |
791 string_vector retval; | |
792 gripe_wrong_type_arg ("octave_base_value::map_keys()", type_name ()); | |
793 return retval; | |
794 } | |
795 | |
2974 | 796 octave_function * |
797 octave_base_value::function_value (bool silent) | |
798 { | |
799 octave_function *retval = 0; | |
800 | |
801 if (! silent) | |
802 gripe_wrong_type_arg ("octave_base_value::function_value()", | |
803 type_name ()); | |
804 return retval; | |
805 } | |
806 | |
7761
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
807 const octave_function * |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
808 octave_base_value::function_value (bool silent) const |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
809 { |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
810 const octave_function *retval = 0; |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
811 |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
812 if (! silent) |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
813 gripe_wrong_type_arg ("octave_base_value::function_value()", |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
814 type_name ()); |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
815 return retval; |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
816 } |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
817 |
4700 | 818 octave_user_function * |
819 octave_base_value::user_function_value (bool silent) | |
820 { | |
821 octave_user_function *retval = 0; | |
822 | |
823 if (! silent) | |
824 gripe_wrong_type_arg ("octave_base_value::user_function_value()", | |
825 type_name ()); | |
826 return retval; | |
827 } | |
828 | |
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
|
829 octave_user_script * |
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
|
830 octave_base_value::user_script_value (bool silent) |
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
|
831 { |
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
|
832 octave_user_script *retval = 0; |
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
|
833 |
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
|
834 if (! silent) |
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
|
835 gripe_wrong_type_arg ("octave_base_value::user_script_value()", |
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
|
836 type_name ()); |
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
|
837 return retval; |
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
|
838 } |
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
|
839 |
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
|
840 octave_user_code * |
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
|
841 octave_base_value::user_code_value (bool silent) |
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
|
842 { |
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
|
843 octave_user_code *retval = 0; |
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
|
844 |
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
|
845 if (! silent) |
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
|
846 gripe_wrong_type_arg ("octave_base_value::user_code_value()", |
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
|
847 type_name ()); |
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
|
848 return retval; |
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
|
849 } |
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
|
850 |
4346 | 851 octave_fcn_handle * |
4343 | 852 octave_base_value::fcn_handle_value (bool silent) |
853 { | |
4346 | 854 octave_fcn_handle *retval = 0; |
4343 | 855 |
856 if (! silent) | |
857 gripe_wrong_type_arg ("octave_base_value::fcn_handle_value()", | |
858 type_name ()); | |
859 return retval; | |
860 } | |
861 | |
4933 | 862 octave_fcn_inline * |
863 octave_base_value::fcn_inline_value (bool silent) | |
864 { | |
865 octave_fcn_inline *retval = 0; | |
866 | |
867 if (! silent) | |
868 gripe_wrong_type_arg ("octave_base_value::fcn_inline_value()", | |
869 type_name ()); | |
870 return retval; | |
871 } | |
872 | |
2882 | 873 octave_value_list |
874 octave_base_value::list_value (void) const | |
875 { | |
876 octave_value_list retval; | |
877 gripe_wrong_type_arg ("octave_base_value::list_value()", type_name ()); | |
878 return retval; | |
879 } | |
880 | |
4687 | 881 bool |
6974 | 882 octave_base_value::save_ascii (std::ostream&) |
4687 | 883 { |
884 gripe_wrong_type_arg ("octave_base_value::save_ascii()", type_name ()); | |
885 return false; | |
886 } | |
887 | |
888 bool | |
889 octave_base_value::load_ascii (std::istream&) | |
890 { | |
891 gripe_wrong_type_arg ("octave_base_value::load_ascii()", type_name ()); | |
892 return false; | |
893 } | |
894 | |
895 bool | |
896 octave_base_value::save_binary (std::ostream&, bool&) | |
897 { | |
898 gripe_wrong_type_arg ("octave_base_value::save_binary()", type_name ()); | |
899 return false; | |
900 } | |
901 | |
902 bool | |
903 octave_base_value::load_binary (std::istream&, bool, | |
904 oct_mach_info::float_format) | |
905 { | |
906 gripe_wrong_type_arg ("octave_base_value::load_binary()", type_name ()); | |
907 return false; | |
908 } | |
909 | |
910 #if defined (HAVE_HDF5) | |
4944 | 911 |
4687 | 912 bool |
913 octave_base_value::save_hdf5 (hid_t, const char *, bool) | |
914 { | |
915 gripe_wrong_type_arg ("octave_base_value::save_binary()", type_name ()); | |
916 | |
917 return false; | |
918 } | |
919 | |
920 bool | |
921 octave_base_value::load_hdf5 (hid_t, const char *, bool) | |
922 { | |
923 gripe_wrong_type_arg ("octave_base_value::load_binary()", type_name ()); | |
924 | |
925 return false; | |
926 } | |
4944 | 927 |
4687 | 928 #endif |
929 | |
4944 | 930 int |
931 octave_base_value::write (octave_stream&, int, oct_data_conv::data_type, | |
932 int, oct_mach_info::float_format) const | |
933 { | |
934 gripe_wrong_type_arg ("octave_base_value::write()", type_name ()); | |
935 | |
936 return false; | |
937 } | |
938 | |
5900 | 939 mxArray * |
940 octave_base_value::as_mxArray (void) const | |
941 { | |
942 gripe_wrong_type_arg ("octave_base_value::as_mxArray ()", type_name ()); | |
943 | |
944 return 0; | |
945 } | |
946 | |
7433 | 947 octave_value |
7620
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7528
diff
changeset
|
948 octave_base_value::diag (octave_idx_type) const |
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7528
diff
changeset
|
949 { |
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7528
diff
changeset
|
950 gripe_wrong_type_arg ("octave_base_value::diag ()", type_name ()); |
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7528
diff
changeset
|
951 |
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7528
diff
changeset
|
952 return octave_value(); |
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7528
diff
changeset
|
953 } |
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7528
diff
changeset
|
954 |
36594d5bbe13
Move diag function into the octave_value class
David Bateman <dbateman@free.fr>
parents:
7528
diff
changeset
|
955 octave_value |
7433 | 956 octave_base_value::sort (octave_idx_type, sortmode) const |
957 { | |
958 gripe_wrong_type_arg ("octave_base_value::sort ()", type_name ()); | |
959 | |
960 return octave_value(); | |
961 } | |
962 | |
963 octave_value | |
964 octave_base_value::sort (Array<octave_idx_type> &, | |
965 octave_idx_type, sortmode) const | |
966 { | |
967 gripe_wrong_type_arg ("octave_base_value::sort ()", type_name ()); | |
968 | |
969 return octave_value(); | |
970 } | |
971 | |
7528
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
972 #define UNDEFINED_MAPPER(F) \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
973 octave_value \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
974 octave_base_value::F (void) const \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
975 { \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
976 gripe_wrong_type_arg ("octave_base_value::" #F " ()", type_name ()); \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
977 return octave_value (); \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
978 } |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
979 |
7528
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
980 UNDEFINED_MAPPER (abs) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
981 UNDEFINED_MAPPER (acos) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
982 UNDEFINED_MAPPER (acosh) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
983 UNDEFINED_MAPPER (angle) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
984 UNDEFINED_MAPPER (arg) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
985 UNDEFINED_MAPPER (asin) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
986 UNDEFINED_MAPPER (asinh) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
987 UNDEFINED_MAPPER (atan) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
988 UNDEFINED_MAPPER (atanh) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
989 UNDEFINED_MAPPER (ceil) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
990 UNDEFINED_MAPPER (conj) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
991 UNDEFINED_MAPPER (cos) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
992 UNDEFINED_MAPPER (cosh) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
993 UNDEFINED_MAPPER (erf) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
994 UNDEFINED_MAPPER (erfc) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
995 UNDEFINED_MAPPER (exp) |
7638
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7636
diff
changeset
|
996 UNDEFINED_MAPPER (expm1) |
7528
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
997 UNDEFINED_MAPPER (finite) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
998 UNDEFINED_MAPPER (fix) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
999 UNDEFINED_MAPPER (floor) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1000 UNDEFINED_MAPPER (gamma) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1001 UNDEFINED_MAPPER (imag) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1002 UNDEFINED_MAPPER (isinf) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1003 UNDEFINED_MAPPER (isna) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1004 UNDEFINED_MAPPER (isnan) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1005 UNDEFINED_MAPPER (lgamma) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1006 UNDEFINED_MAPPER (log) |
7740 | 1007 UNDEFINED_MAPPER (log2) |
7528
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1008 UNDEFINED_MAPPER (log10) |
7638
2df457529cfa
implement expm1 and log1p functions
Jaroslav Hajek <highegg@gmail.com>
parents:
7636
diff
changeset
|
1009 UNDEFINED_MAPPER (log1p) |
7528
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1010 UNDEFINED_MAPPER (real) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1011 UNDEFINED_MAPPER (round) |
7636
99c410f7f0b0
implement mapper function for banker's rounding
Jaroslav Hajek <highegg@gmail.com>
parents:
7620
diff
changeset
|
1012 UNDEFINED_MAPPER (roundb) |
7528
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1013 UNDEFINED_MAPPER (signum) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1014 UNDEFINED_MAPPER (sin) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1015 UNDEFINED_MAPPER (sinh) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1016 UNDEFINED_MAPPER (sqrt) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1017 UNDEFINED_MAPPER (tan) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1018 UNDEFINED_MAPPER (tanh) |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
1019 |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
1020 // String mapper functions, convert to a string |
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
1021 |
7528
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1022 #define STRING_MAPPER(F) \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1023 octave_value \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1024 octave_base_value::F (void) const \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1025 { \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1026 octave_value tmp = octave_value (char_array_value (true), true); \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1027 return error_state ? octave_value () : octave_value (tmp.F ()); \ |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1028 } |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
1029 |
7528
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1030 STRING_MAPPER (xisalnum) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1031 STRING_MAPPER (xisalpha) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1032 STRING_MAPPER (xisascii) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1033 STRING_MAPPER (xiscntrl) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1034 STRING_MAPPER (xisdigit) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1035 STRING_MAPPER (xisgraph) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1036 STRING_MAPPER (xislower) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1037 STRING_MAPPER (xisprint) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1038 STRING_MAPPER (xispunct) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1039 STRING_MAPPER (xisspace) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1040 STRING_MAPPER (xisupper) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1041 STRING_MAPPER (xisxdigit) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1042 STRING_MAPPER (xtoascii) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1043 STRING_MAPPER (xtolower) |
26d8a92644de
try to avoid ctype macro problems
John W. Eaton <jwe@octave.org>
parents:
7503
diff
changeset
|
1044 STRING_MAPPER (xtoupper) |
7503
8c32f95c2639
convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents:
7489
diff
changeset
|
1045 |
7489
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1046 void |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1047 octave_base_value::lock (void) |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1048 { |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1049 gripe_wrong_type_arg ("octave_base_value::lock ()", type_name ()); |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1050 } |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1051 |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1052 void |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1053 octave_base_value::unlock (void) |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1054 { |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1055 gripe_wrong_type_arg ("octave_base_value::unlock ()", type_name ()); |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1056 } |
8e4592e49fa7
don't clear locked functions
John W. Eaton <jwe@octave.org>
parents:
7433
diff
changeset
|
1057 |
7761
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1058 void |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1059 octave_base_value::dump (std::ostream& os) const |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1060 { |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1061 dim_vector dv = this->dims (); |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1062 |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1063 os << "class: " << this->class_name () |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1064 << " type: " << this->type_name () |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1065 << " dims: " << dv.str (); |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1066 } |
5adeea5de26c
symbol table reporting functions
John W. Eaton <jwe@octave.org>
parents:
7740
diff
changeset
|
1067 |
5759 | 1068 static void |
1069 gripe_indexed_assignment (const std::string& tn1, const std::string& tn2) | |
1070 { | |
1071 error ("assignment of `%s' to indexed `%s' not implemented", | |
1072 tn2.c_str (), tn1.c_str ()); | |
1073 } | |
1074 | |
1075 static void | |
1076 gripe_assign_conversion_failed (const std::string& tn1, | |
1077 const std::string& tn2) | |
1078 { | |
1079 error ("type conversion for assignment of `%s' to indexed `%s' failed", | |
1080 tn2.c_str (), tn1.c_str ()); | |
1081 } | |
1082 | |
1083 static void | |
1084 gripe_no_conversion (const std::string& on, const std::string& tn1, | |
1085 const std::string& tn2) | |
1086 { | |
1087 error ("operator %s: no conversion for assignment of `%s' to indexed `%s'", | |
1088 on.c_str (), tn2.c_str (), tn1.c_str ()); | |
1089 } | |
1090 | |
1091 octave_value | |
1092 octave_base_value::numeric_assign (const std::string& type, | |
1093 const std::list<octave_value_list>& idx, | |
1094 const octave_value& rhs) | |
1095 { | |
1096 octave_value retval; | |
1097 | |
1098 int t_lhs = type_id (); | |
1099 int t_rhs = rhs.type_id (); | |
1100 | |
1101 octave_value_typeinfo::assign_op_fcn f | |
1102 = octave_value_typeinfo::lookup_assign_op (octave_value::op_asn_eq, | |
1103 t_lhs, t_rhs); | |
1104 | |
1105 bool done = false; | |
1106 | |
1107 if (f) | |
1108 { | |
1109 f (*this, idx.front (), rhs.get_rep ()); | |
1110 | |
1111 done = (! error_state); | |
1112 } | |
1113 | |
1114 if (done) | |
1115 { | |
1116 count++; | |
1117 retval = octave_value (this); | |
1118 } | |
1119 else | |
1120 { | |
1121 int t_result | |
1122 = octave_value_typeinfo::lookup_pref_assign_conv (t_lhs, t_rhs); | |
1123 | |
1124 if (t_result >= 0) | |
1125 { | |
1126 octave_base_value::type_conv_fcn cf | |
1127 = octave_value_typeinfo::lookup_widening_op (t_lhs, t_result); | |
1128 | |
1129 if (cf) | |
1130 { | |
5874 | 1131 octave_base_value *tmp = cf (*this); |
5759 | 1132 |
1133 if (tmp) | |
1134 { | |
5874 | 1135 octave_value val (tmp); |
1136 | |
1137 retval = val.subsasgn (type, idx, rhs); | |
5759 | 1138 |
1139 done = (! error_state); | |
1140 } | |
1141 else | |
1142 gripe_assign_conversion_failed (type_name (), | |
1143 rhs.type_name ()); | |
1144 } | |
1145 else | |
1146 gripe_indexed_assignment (type_name (), rhs.type_name ()); | |
1147 } | |
1148 | |
1149 if (! (done || error_state)) | |
1150 { | |
1151 octave_value tmp_rhs; | |
1152 | |
1153 octave_base_value::type_conv_fcn cf_rhs | |
1154 = rhs.numeric_conversion_function (); | |
1155 | |
1156 if (cf_rhs) | |
1157 { | |
1158 octave_base_value *tmp = cf_rhs (rhs.get_rep ()); | |
1159 | |
1160 if (tmp) | |
1161 tmp_rhs = octave_value (tmp); | |
1162 else | |
1163 { | |
1164 gripe_assign_conversion_failed (type_name (), | |
1165 rhs.type_name ()); | |
1166 return octave_value (); | |
1167 } | |
1168 } | |
1169 else | |
1170 tmp_rhs = rhs; | |
1171 | |
1172 octave_base_value::type_conv_fcn cf_this | |
1173 = numeric_conversion_function (); | |
1174 | |
5897 | 1175 count++; |
1176 octave_value tmp_lhs = octave_value (this); | |
5759 | 1177 |
1178 if (cf_this) | |
1179 { | |
1180 octave_base_value *tmp = cf_this (*this); | |
1181 | |
1182 if (tmp) | |
5897 | 1183 tmp_lhs = octave_value (tmp); |
5759 | 1184 else |
1185 { | |
1186 gripe_assign_conversion_failed (type_name (), | |
1187 rhs.type_name ()); | |
1188 return octave_value (); | |
1189 } | |
1190 } | |
1191 | |
1192 if (cf_this || cf_rhs) | |
1193 { | |
5897 | 1194 retval = tmp_lhs.subsasgn (type, idx, tmp_rhs); |
5759 | 1195 |
1196 done = (! error_state); | |
1197 } | |
1198 else | |
1199 gripe_no_conversion (octave_value::assign_op_as_string (octave_value::op_asn_eq), | |
1200 type_name (), rhs.type_name ()); | |
1201 } | |
1202 } | |
1203 | |
1204 // The assignment may have converted to a type that is wider than | |
1205 // necessary. | |
1206 | |
1207 retval.maybe_mutate (); | |
1208 | |
1209 return retval; | |
1210 } | |
1211 | |
1212 // Current indentation. | |
1213 int octave_base_value::curr_print_indent_level = 0; | |
1214 | |
1215 // TRUE means we are at the beginning of a line. | |
1216 bool octave_base_value::beginning_of_line = true; | |
1217 | |
1218 // Each print() function should call this before printing anything. | |
1219 // | |
1220 // This doesn't need to be fast, but isn't there a better way? | |
1221 | |
1222 void | |
1223 octave_base_value::indent (std::ostream& os) const | |
1224 { | |
1225 assert (curr_print_indent_level >= 0); | |
1226 | |
1227 if (beginning_of_line) | |
1228 { | |
5775 | 1229 // FIXME -- do we need this? |
5759 | 1230 // os << prefix; |
1231 | |
1232 for (int i = 0; i < curr_print_indent_level; i++) | |
1233 os << " "; | |
1234 | |
1235 beginning_of_line = false; | |
1236 } | |
1237 } | |
1238 | |
1239 // All print() functions should use this to print new lines. | |
1240 | |
1241 void | |
1242 octave_base_value::newline (std::ostream& os) const | |
1243 { | |
1244 os << "\n"; | |
1245 | |
1246 beginning_of_line = true; | |
1247 } | |
1248 | |
1249 // For ressetting print state. | |
1250 | |
1251 void | |
1252 octave_base_value::reset (void) const | |
1253 { | |
1254 beginning_of_line = true; | |
1255 curr_print_indent_level = 0; | |
1256 } | |
1257 | |
3203 | 1258 CONVDECLX (matrix_conv) |
2376 | 1259 { |
1260 return new octave_matrix (); | |
1261 } | |
1262 | |
3203 | 1263 CONVDECLX (complex_matrix_conv) |
2376 | 1264 { |
1265 return new octave_complex_matrix (); | |
1266 } | |
1267 | |
3203 | 1268 CONVDECLX (string_conv) |
2376 | 1269 { |
1270 return new octave_char_matrix_str (); | |
1271 } | |
1272 | |
3928 | 1273 CONVDECLX (cell_conv) |
1274 { | |
1275 return new octave_cell (); | |
1276 } | |
1277 | |
2376 | 1278 void |
1279 install_base_type_conversions (void) | |
1280 { | |
1281 INSTALL_ASSIGNCONV (octave_base_value, octave_scalar, octave_matrix); | |
1282 INSTALL_ASSIGNCONV (octave_base_value, octave_matrix, octave_matrix); | |
1283 INSTALL_ASSIGNCONV (octave_base_value, octave_complex, octave_complex_matrix); | |
1284 INSTALL_ASSIGNCONV (octave_base_value, octave_complex_matrix, octave_complex_matrix); | |
1285 INSTALL_ASSIGNCONV (octave_base_value, octave_range, octave_matrix); | |
1286 INSTALL_ASSIGNCONV (octave_base_value, octave_char_matrix_str, octave_char_matrix_str); | |
3928 | 1287 INSTALL_ASSIGNCONV (octave_base_value, octave_cell, octave_cell); |
2376 | 1288 |
1289 INSTALL_WIDENOP (octave_base_value, octave_matrix, matrix_conv); | |
1290 INSTALL_WIDENOP (octave_base_value, octave_complex_matrix, complex_matrix_conv); | |
1291 INSTALL_WIDENOP (octave_base_value, octave_char_matrix_str, string_conv); | |
3928 | 1292 INSTALL_WIDENOP (octave_base_value, octave_cell, cell_conv); |
2376 | 1293 } |
1294 | |
5794 | 1295 DEFUN (silent_functions, args, nargout, |
1296 "-*- texinfo -*-\n\ | |
1297 @deftypefn {Built-in Function} {@var{val} =} silent_functions ()\n\ | |
1298 @deftypefnx {Built-in Function} {@var{old_val} =} silent_functions (@var{new_val})\n\ | |
1299 Query or set the internal variable that controls whether internal\n\ | |
1300 output from a function is suppressed. If this option is disabled,\n\ | |
1301 Octave will display the results produced by evaluating expressions\n\ | |
1302 within a function body that are not terminated with a semicolon.\n\ | |
1303 @end deftypefn") | |
5759 | 1304 { |
5794 | 1305 return SET_INTERNAL_VARIABLE (silent_functions); |
5759 | 1306 } |
1307 | |
7193 | 1308 DEFUN (sparse_auto_mutate, args, nargout, |
1309 "-*- texinfo -*-\n\ | |
1310 @deftypefn {Built-in Function} {@var{val} =} sparse_auto_mutate ()\n\ | |
1311 @deftypefnx {Built-in Function} {@var{old_val} =} sparse_auto_mutate (@var{new_val})\n\ | |
1312 Query or set the internal variable that controls whether Octave will\n\ | |
1313 automatically mutate sparse matrices to real matrices to save memory.\n\ | |
1314 For example,\n\ | |
1315 \n\ | |
1316 @example\n\ | |
1317 s = speye(3);\n\ | |
1318 sparse_auto_mutate (false)\n\ | |
1319 s (:, 1) = 1;\n\ | |
1320 typeinfo (s)\n\ | |
1321 @result{} sparse matrix\n\ | |
1322 sparse_auto_mutate (true)\n\ | |
1323 s (1, :) = 1;\n\ | |
1324 typeinfo (s)\n\ | |
1325 @result{} matrix\n\ | |
1326 @end example\n\ | |
1327 @end deftypefn") | |
1328 { | |
1329 return SET_INTERNAL_VARIABLE (sparse_auto_mutate); | |
1330 } | |
1331 | |
2376 | 1332 /* |
1333 ;;; Local Variables: *** | |
1334 ;;; mode: C++ *** | |
1335 ;;; End: *** | |
1336 */ |