GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ov.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1996-2017 John W. Eaton
4 Copyright (C) 2009-2010 VZLU Prague
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
10 Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
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
19 along with Octave; see the file COPYING. If not, see
20 <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #if ! defined (octave_ov_h)
25 #define octave_ov_h 1
26 
27 #include "octave-config.h"
28 
29 #include <cstdlib>
30 
31 #include <iosfwd>
32 #include <string>
33 #include <list>
34 
35 #include "Range.h"
36 #include "data-conv.h"
37 #include "idx-vector.h"
38 #include "mach-info.h"
39 #include "mx-base.h"
40 #include "oct-time.h"
41 #include "str-vec.h"
42 
43 #include "oct-sort.h"
44 
45 class Cell;
46 class mxArray;
47 class octave_map;
48 class octave_scalar_map;
49 class octave_stream;
50 class octave_function;
52 class octave_fcn_handle;
53 class octave_fcn_inline;
54 class octave_value_list;
55 class octave_lvalue;
56 
57 #include "ov-base.h"
58 
59 // Forward declarations of friend functions that have default arguments.
60 
62  const octave_value& limit,
63  bool is_for_cmd_expr = false);
64 
66  const octave_value& increment,
67  const octave_value& limit,
68  bool is_for_cmd_expr = false);
69 
70 class
73 {
74 public:
75 
76  enum unary_op
77  {
78  op_not, // not
79  op_uplus, // uplus
80  op_uminus, // uminus
81  op_transpose, // transpose
82  op_hermitian, // ctranspose
86  unknown_unary_op
87  };
88 
89  enum binary_op
90  {
91  op_add, // plus
92  op_sub, // minus
93  op_mul, // mtimes
94  op_div, // mrdivide
95  op_pow, // mpower
96  op_ldiv, // mldivide
97  op_lt, // lt
98  op_le, // le
99  op_eq, // eq
100  op_ge, // ge
101  op_gt, // gt
102  op_ne, // ne
103  op_el_mul, // times
104  op_el_div, // rdivide
105  op_el_pow, // power
106  op_el_ldiv, // ldivide
107  op_el_and, // and
108  op_el_or, // or
111  unknown_binary_op
112  };
113 
115  {
116  // ** compound operations **
128  unknown_compound_binary_op
129  };
130 
132  {
147  unknown_assign_op
148  };
149 
150  static binary_op assign_op_to_binary_op (assign_op);
151 
152  static assign_op binary_op_to_assign_op (binary_op);
153 
154  static std::string unary_op_as_string (unary_op);
155  static std::string unary_op_fcn_name (unary_op);
156 
157  static std::string binary_op_as_string (binary_op);
158  static std::string binary_op_fcn_name (binary_op);
159 
160  static std::string binary_op_fcn_name (compound_binary_op);
161 
162  static std::string assign_op_as_string (assign_op);
163 
164  static octave_value empty_conv (const std::string& type,
165  const octave_value& rhs = octave_value ());
166 
167  enum magic_colon { magic_colon_t };
168 
170  : rep (nil_rep ())
171  {
172  rep->count++;
173  }
174 
175  octave_value (short int i);
176  octave_value (unsigned short int i);
177  octave_value (int i);
178  octave_value (unsigned int i);
179  octave_value (long int i);
180  octave_value (unsigned long int i);
181 
182  // FIXME: These are kluges. They turn into doubles internally, which will
183  // break for very large values. We just use them to store things like
184  // 64-bit ino_t, etc, and hope that those values are never actually larger
185  // than can be represented exactly in a double.
186 
187 #if defined (OCTAVE_HAVE_LONG_LONG_INT)
188  octave_value (long long int i);
189 #endif
190 #if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT)
191  octave_value (unsigned long long int i);
192 #endif
193 
195  octave_value (double d);
196  octave_value (float d);
197  octave_value (const Array<octave_value>& a, bool is_cs_list = false);
198  octave_value (const Cell& c, bool is_cs_list = false);
199  octave_value (const Matrix& m, const MatrixType& t = MatrixType ());
200  octave_value (const FloatMatrix& m, const MatrixType& t = MatrixType ());
201  octave_value (const NDArray& nda);
202  octave_value (const FloatNDArray& nda);
203  octave_value (const Array<double>& m);
204  octave_value (const Array<float>& m);
205  octave_value (const DiagMatrix& d);
210  octave_value (const FloatDiagMatrix& d);
211  octave_value (const RowVector& v);
212  octave_value (const FloatRowVector& v);
213  octave_value (const ColumnVector& v);
214  octave_value (const FloatColumnVector& v);
215  octave_value (const Complex& C);
216  octave_value (const FloatComplex& C);
217  octave_value (const ComplexMatrix& m, const MatrixType& t = MatrixType ());
219  const MatrixType& t = MatrixType ());
220  octave_value (const ComplexNDArray& cnda);
221  octave_value (const FloatComplexNDArray& cnda);
222  octave_value (const Array<Complex>& m);
226  octave_value (const ComplexRowVector& v);
230  octave_value (const PermMatrix& p);
231  octave_value (bool b);
232  octave_value (const boolMatrix& bm, const MatrixType& t = MatrixType ());
233  octave_value (const boolNDArray& bnda);
234  octave_value (const Array<bool>& bnda);
235  octave_value (char c, char type = '\'');
236  octave_value (const char *s, char type = '\'');
237  octave_value (const std::string& s, char type = '\'');
238  octave_value (const string_vector& s, char type = '\'');
239  octave_value (const charMatrix& chm, char type = '\'');
240  octave_value (const charNDArray& chnda, char type = '\'');
241  octave_value (const Array<char>& chnda, char type = '\'');
242 
243  OCTAVE_DEPRECATED ("note: IS_STRING argument is ignored")
244  octave_value (const charMatrix& chm, bool is_string, char type = '\'');
245 
246  OCTAVE_DEPRECATED ("note: IS_STRING argument is ignored")
247  octave_value (const charNDArray& chnda, bool is_string, char type = '\'');
248 
249  OCTAVE_DEPRECATED ("note: IS_STRING argument is ignored")
250  octave_value (const Array<char>& chnda, bool is_string, char type = '\'');
251 
252  octave_value (const SparseMatrix& m, const MatrixType& t = MatrixType ());
253  octave_value (const Sparse<double>& m, const MatrixType& t = MatrixType ());
255  const MatrixType& t = MatrixType ());
256  octave_value (const Sparse<Complex>& m, const MatrixType& t = MatrixType ());
257  octave_value (const SparseBoolMatrix& bm,
258  const MatrixType& t = MatrixType ());
259  octave_value (const Sparse<bool>& m, const MatrixType& t = MatrixType ());
260  octave_value (const octave_int8& i);
261  octave_value (const octave_int16& i);
262  octave_value (const octave_int32& i);
263  octave_value (const octave_int64& i);
264  octave_value (const octave_uint8& i);
265  octave_value (const octave_uint16& i);
266  octave_value (const octave_uint32& i);
267  octave_value (const octave_uint64& i);
268  octave_value (const int8NDArray& inda);
269  octave_value (const Array<octave_int8>& inda);
270  octave_value (const int16NDArray& inda);
271  octave_value (const Array<octave_int16>& inda);
272  octave_value (const int32NDArray& inda);
273  octave_value (const Array<octave_int32>& inda);
274  octave_value (const int64NDArray& inda);
275  octave_value (const Array<octave_int64>& inda);
276  octave_value (const uint8NDArray& inda);
277  octave_value (const Array<octave_uint8>& inda);
278  octave_value (const uint16NDArray& inda);
279  octave_value (const Array<octave_uint16>& inda);
280  octave_value (const uint32NDArray& inda);
281  octave_value (const Array<octave_uint32>& inda);
282  octave_value (const uint64NDArray& inda);
283  octave_value (const Array<octave_uint64>& inda);
284  octave_value (const Array<octave_idx_type>& inda,
285  bool zero_based = false, bool cache_index = false);
286  octave_value (const Array<std::string>& cellstr);
287  octave_value (const idx_vector& idx, bool lazy = true);
288  octave_value (double base, double limit, double inc);
289  octave_value (const Range& r, bool force_range = false);
290  octave_value (const octave_map& m);
291  octave_value (const octave_scalar_map& m);
292  octave_value (const octave_map& m, const std::string& id,
293  const std::list<std::string>& plist);
294  octave_value (const octave_scalar_map& m, const std::string& id,
295  const std::list<std::string>& plist);
296  octave_value (const octave_value_list& m, bool = false);
297  octave_value (octave_value::magic_colon);
298 
299  octave_value (octave_base_value *new_rep, bool borrow = false);
300 
301  OCTAVE_DEPRECATED ("note: in the future there will be no way to directly set reference count")
302  octave_value (octave_base_value *new_rep, int xcount);
303 
304  // Copy constructor.
305 
307  {
308  rep = a.rep;
309  rep->count++;
310  }
311 
312  // This should only be called for derived types.
313 
314  octave_base_value *clone (void) const;
315 
317  { return rep->empty_clone (); }
318 
319  // Delete the representation of this constant if the count drops to zero.
320 
322  {
323  if (--rep->count == 0)
324  delete rep;
325  }
326 
327  void make_unique (void)
328  {
329  if (rep->count > 1)
330  {
331  octave_base_value *r = rep->unique_clone ();
332 
333  if (--rep->count == 0)
334  delete rep;
335 
336  rep = r;
337  }
338  }
339 
340  // This uniquifies the value if it is referenced by more than a certain
341  // number of shallow copies. This is useful for optimizations where we
342  // know a certain copy, typically within a cell array, to be obsolete.
343  void make_unique (int obsolete_copies)
344  {
345  if (rep->count > obsolete_copies + 1)
346  {
347  octave_base_value *r = rep->unique_clone ();
348 
349  if (--rep->count == 0)
350  delete rep;
351 
352  rep = r;
353  }
354  }
355 
356  // Simple assignment.
357 
359  {
360  if (rep != a.rep)
361  {
362  if (--rep->count == 0)
363  delete rep;
364 
365  rep = a.rep;
366  rep->count++;
367  }
368 
369  return *this;
370  }
371 
372  octave_idx_type get_count (void) const { return rep->count; }
373 
375  { return rep->numeric_conversion_function (); }
376 
378  { return rep->numeric_demotion_function (); }
379 
380  void maybe_mutate (void);
381 
382  octave_value squeeze (void) const
383  { return rep->squeeze (); }
384 
385  // The result of full().
387  { return rep->full_value (); }
388 
389  // Type conversions.
390 
391  octave_value as_double (void) const { return rep->as_double (); }
392  octave_value as_single (void) const { return rep->as_single (); }
393 
394  octave_value as_int8 (void) const { return rep->as_int8 (); }
395  octave_value as_int16 (void) const { return rep->as_int16 (); }
396  octave_value as_int32 (void) const { return rep->as_int32 (); }
397  octave_value as_int64 (void) const { return rep->as_int64 (); }
398 
399  octave_value as_uint8 (void) const { return rep->as_uint8 (); }
400  octave_value as_uint16 (void) const { return rep->as_uint16 (); }
401  octave_value as_uint32 (void) const { return rep->as_uint32 (); }
402  octave_value as_uint64 (void) const { return rep->as_uint64 (); }
403 
405  { return rep->try_narrowing_conversion (); }
406 
407  // Close to dims (), but can be overloaded for classes.
408  Matrix size (void)
409  { return rep->size (); }
410 
412  { return rep->numel (idx); }
413 
414  octave_value single_subsref (const std::string& type,
415  const octave_value_list& idx);
416 
418  const std::list<octave_value_list>& idx)
419  { return rep->subsref (type, idx); }
420 
422  const std::list<octave_value_list>& idx,
423  bool auto_add)
424  { return rep->subsref (type, idx, auto_add); }
425 
427  const std::list<octave_value_list>& idx,
428  int nargout);
429 
431  const std::list<octave_value_list>& idx,
432  int nargout,
433  const std::list<octave_lvalue> *lvalue_list);
434 
435  octave_value next_subsref (const std::string& type, const
436  std::list<octave_value_list>& idx,
437  size_t skip = 1);
438 
439  octave_value_list next_subsref (int nargout,
440  const std::string& type, const
441  std::list<octave_value_list>& idx,
442  size_t skip = 1);
443 
444  octave_value_list next_subsref (int nargout,
445  const std::string& type, const
446  std::list<octave_value_list>& idx,
447  const std::list<octave_lvalue> *lvalue_list,
448  size_t skip = 1);
449 
450  octave_value next_subsref (bool auto_add, const std::string& type, const
451  std::list<octave_value_list>& idx,
452  size_t skip = 1);
453 
455  bool resize_ok = false)
456  { return rep->do_index_op (idx, resize_ok); }
457 
459  do_multi_index_op (int nargout, const octave_value_list& idx);
460 
462  do_multi_index_op (int nargout, const octave_value_list& idx,
463  const std::list<octave_lvalue> *lvalue_list);
464 
465  octave_value subsasgn (const std::string& type,
466  const std::list<octave_value_list>& idx,
467  const octave_value& rhs);
468 
469  octave_value undef_subsasgn (const std::string& type,
470  const std::list<octave_value_list>& idx,
471  const octave_value& rhs);
472 
473  octave_value& assign (assign_op op, const std::string& type,
474  const std::list<octave_value_list>& idx,
475  const octave_value& rhs);
476 
477  octave_value& assign (assign_op, const octave_value& rhs);
478 
479  idx_vector index_vector (bool require_integers = false) const
480  {
481  return rep->index_vector (require_integers);
482  }
483 
484  // Size.
485 
486  dim_vector dims (void) const
487  { return rep->dims (); }
488 
489  octave_idx_type rows (void) const { return rep->rows (); }
490 
491  octave_idx_type columns (void) const { return rep->columns (); }
492 
493  octave_idx_type length (void) const;
494 
495  int ndims (void) const { return rep->ndims (); }
496 
497  bool all_zero_dims (void) const { return dims ().all_zero (); }
498 
499  octave_idx_type numel (void) const
500  { return rep->numel (); }
501 
502  OCTAVE_DEPRECATED ("use 'numel' instead")
503  octave_idx_type capacity (void) const
504  { return rep->numel (); }
505 
506  size_t byte_size (void) const
507  { return rep->byte_size (); }
508 
509  octave_idx_type nnz (void) const { return rep->nnz (); }
510 
511  octave_idx_type nzmax (void) const { return rep->nzmax (); }
512 
513  octave_idx_type nfields (void) const { return rep->nfields (); }
514 
516  { return rep->reshape (dv); }
517 
518  octave_value permute (const Array<int>& vec, bool inv = false) const
519  { return rep->permute (vec, inv); }
520 
521  octave_value ipermute (const Array<int>& vec) const
522  { return rep->permute (vec, true); }
523 
524  octave_value resize (const dim_vector& dv, bool fill = false) const
525  { return rep->resize (dv, fill);}
526 
527  MatrixType matrix_type (void) const
528  { return rep->matrix_type (); }
529 
530  MatrixType matrix_type (const MatrixType& typ) const
531  { return rep->matrix_type (typ); }
532 
533  // Does this constant have a type? Both of these are provided since it is
534  // sometimes more natural to write is_undefined() instead of ! is_defined().
535 
536  bool is_defined (void) const
537  { return rep->is_defined (); }
538 
539  bool is_undefined (void) const
540  { return ! is_defined (); }
541 
542  bool is_empty (void) const
543  { return rep->is_empty (); }
544 
545  bool is_cell (void) const
546  { return rep->is_cell (); }
547 
548  bool is_cellstr (void) const
549  { return rep->is_cellstr (); }
550 
551  bool is_real_scalar (void) const
552  { return rep->is_real_scalar (); }
553 
554  bool is_real_matrix (void) const
555  { return rep->is_real_matrix (); }
556 
557  bool is_complex_scalar (void) const
558  { return rep->is_complex_scalar (); }
559 
560  bool is_complex_matrix (void) const
561  { return rep->is_complex_matrix (); }
562 
563  bool is_bool_scalar (void) const
564  { return rep->is_bool_scalar (); }
565 
566  bool is_bool_matrix (void) const
567  { return rep->is_bool_matrix (); }
568 
569  bool is_char_matrix (void) const
570  { return rep->is_char_matrix (); }
571 
572  bool is_diag_matrix (void) const
573  { return rep->is_diag_matrix (); }
574 
575  bool is_perm_matrix (void) const
576  { return rep->is_perm_matrix (); }
577 
578  bool is_string (void) const
579  { return rep->is_string (); }
580 
581  bool is_sq_string (void) const
582  { return rep->is_sq_string (); }
583 
584  bool is_dq_string (void) const
585  { return rep->is_string () && ! rep->is_sq_string (); }
586 
587  bool is_range (void) const
588  { return rep->is_range (); }
589 
590  bool is_map (void) const
591  { return rep->is_map (); }
592 
593  bool is_object (void) const
594  { return rep->is_object (); }
595 
596  bool is_classdef_object (void) const
597  { return rep->is_classdef_object (); }
598 
599  bool is_java (void) const
600  { return rep->is_java (); }
601 
602  bool is_cs_list (void) const
603  { return rep->is_cs_list (); }
604 
605  bool is_magic_colon (void) const
606  { return rep->is_magic_colon (); }
607 
608  bool is_null_value (void) const
609  { return rep->is_null_value (); }
610 
611  // Are any or all of the elements in this constant nonzero?
612 
613  octave_value all (int dim = 0) const
614  { return rep->all (dim); }
615 
616  octave_value any (int dim = 0) const
617  { return rep->any (dim); }
618 
620  { return rep->builtin_type (); }
621 
622  // Floating point types.
623 
624  bool is_double_type (void) const
625  { return rep->is_double_type (); }
626 
627  bool is_single_type (void) const
628  { return rep->is_single_type (); }
629 
630  bool is_float_type (void) const
631  { return rep->is_float_type (); }
632 
633  // Integer types.
634 
635  bool is_int8_type (void) const
636  { return rep->is_int8_type (); }
637 
638  bool is_int16_type (void) const
639  { return rep->is_int16_type (); }
640 
641  bool is_int32_type (void) const
642  { return rep->is_int32_type (); }
643 
644  bool is_int64_type (void) const
645  { return rep->is_int64_type (); }
646 
647  bool is_uint8_type (void) const
648  { return rep->is_uint8_type (); }
649 
650  bool is_uint16_type (void) const
651  { return rep->is_uint16_type (); }
652 
653  bool is_uint32_type (void) const
654  { return rep->is_uint32_type (); }
655 
656  bool is_uint64_type (void) const
657  { return rep->is_uint64_type (); }
658 
659  // Other type stuff.
660 
661  bool is_bool_type (void) const
662  { return rep->is_bool_type (); }
663 
664  bool is_integer_type (void) const
665  { return rep->is_integer_type (); }
666 
667  bool is_real_type (void) const
668  { return rep->is_real_type (); }
669 
670  bool is_complex_type (void) const
671  { return rep->is_complex_type (); }
672 
673  bool is_scalar_type (void) const
674  { return rep->is_scalar_type (); }
675 
676  bool is_matrix_type (void) const
677  { return rep->is_matrix_type (); }
678 
679  bool is_numeric_type (void) const
680  { return rep->is_numeric_type (); }
681 
682  bool is_sparse_type (void) const
683  { return rep->is_sparse_type (); }
684 
685  // Does this constant correspond to a truth value?
686 
687  bool is_true (void) const
688  { return rep->is_true (); }
689 
690  // Do two constants match (in a switch statement)?
691 
692  bool is_equal (const octave_value&) const;
693 
694  // Are the dimensions of this constant zero by zero?
695 
696  bool is_zero_by_zero (void) const
697  { return (ndims () == 2 && rows () == 0 && columns () == 0); }
698 
699  bool is_constant (void) const
700  { return rep->is_constant (); }
701 
702  bool is_function_handle (void) const
703  { return rep->is_function_handle (); }
704 
705  bool is_anonymous_function (void) const
706  { return rep->is_anonymous_function (); }
707 
708  bool is_inline_function (void) const
709  { return rep->is_inline_function (); }
710 
711  bool is_function (void) const
712  { return rep->is_function (); }
713 
714  bool is_user_script (void) const
715  { return rep->is_user_script (); }
716 
717  bool is_user_function (void) const
718  { return rep->is_user_function (); }
719 
720  bool is_user_code (void) const
721  { return rep->is_user_code (); }
722 
723  bool is_builtin_function (void) const
724  { return rep->is_builtin_function (); }
725 
726  bool is_dld_function (void) const
727  { return rep->is_dld_function (); }
728 
729  bool is_mex_function (void) const
730  { return rep->is_mex_function (); }
731 
732  void erase_subfunctions (void) { rep->erase_subfunctions (); }
733 
734  // Values.
735 
736  octave_value eval (void) { return *this; }
737 
738  short int
739  short_value (bool req_int = false, bool frc_str_conv = false) const
740  { return rep->short_value (req_int, frc_str_conv); }
741 
742  unsigned short int
743  ushort_value (bool req_int = false, bool frc_str_conv = false) const
744  { return rep->ushort_value (req_int, frc_str_conv); }
745 
746  int int_value (bool req_int = false, bool frc_str_conv = false) const
747  { return rep->int_value (req_int, frc_str_conv); }
748 
749  unsigned int
750  uint_value (bool req_int = false, bool frc_str_conv = false) const
751  { return rep->uint_value (req_int, frc_str_conv); }
752 
753  int nint_value (bool frc_str_conv = false) const
754  { return rep->nint_value (frc_str_conv); }
755 
756  long int
757  long_value (bool req_int = false, bool frc_str_conv = false) const
758  { return rep->long_value (req_int, frc_str_conv); }
759 
760  unsigned long int
761  ulong_value (bool req_int = false, bool frc_str_conv = false) const
762  { return rep->ulong_value (req_int, frc_str_conv); }
763 
764  int64_t
765  int64_value (bool req_int = false, bool frc_str_conv = false) const
766  { return rep->int64_value (req_int, frc_str_conv); }
767 
768  uint64_t
769  uint64_value (bool req_int = false, bool frc_str_conv = false) const
770  { return rep->uint64_value (req_int, frc_str_conv); }
771 
773  idx_type_value (bool req_int = false, bool frc_str_conv = false) const;
774 
775  double double_value (bool frc_str_conv = false) const
776  { return rep->double_value (frc_str_conv); }
777 
778  float float_value (bool frc_str_conv = false) const
779  { return rep->float_value (frc_str_conv); }
780 
781  double scalar_value (bool frc_str_conv = false) const
782  { return rep->scalar_value (frc_str_conv); }
783 
784  float float_scalar_value (bool frc_str_conv = false) const
785  { return rep->float_scalar_value (frc_str_conv); }
786 
787  Matrix matrix_value (bool frc_str_conv = false) const
788  { return rep->matrix_value (frc_str_conv); }
789 
790  FloatMatrix float_matrix_value (bool frc_str_conv = false) const
791  { return rep->float_matrix_value (frc_str_conv); }
792 
793  NDArray array_value (bool frc_str_conv = false) const
794  { return rep->array_value (frc_str_conv); }
795 
796  FloatNDArray float_array_value (bool frc_str_conv = false) const
797  { return rep->float_array_value (frc_str_conv); }
798 
799  Complex complex_value (bool frc_str_conv = false) const
800  { return rep->complex_value (frc_str_conv); }
801 
802  FloatComplex float_complex_value (bool frc_str_conv = false) const
803  { return rep->float_complex_value (frc_str_conv); }
804 
805  ComplexMatrix complex_matrix_value (bool frc_str_conv = false) const
806  { return rep->complex_matrix_value (frc_str_conv); }
807 
809  float_complex_matrix_value (bool frc_str_conv = false) const
810  { return rep->float_complex_matrix_value (frc_str_conv); }
811 
812  ComplexNDArray complex_array_value (bool frc_str_conv = false) const
813  { return rep->complex_array_value (frc_str_conv); }
814 
816  float_complex_array_value (bool frc_str_conv = false) const
817  { return rep->float_complex_array_value (frc_str_conv); }
818 
819  bool bool_value (bool warn = false) const
820  { return rep->bool_value (warn); }
821 
822  boolMatrix bool_matrix_value (bool warn = false) const
823  { return rep->bool_matrix_value (warn); }
824 
825  boolNDArray bool_array_value (bool warn = false) const
826  { return rep->bool_array_value (warn); }
827 
828  charMatrix char_matrix_value (bool frc_str_conv = false) const
829  { return rep->char_matrix_value (frc_str_conv); }
830 
831  charNDArray char_array_value (bool frc_str_conv = false) const
832  { return rep->char_array_value (frc_str_conv); }
833 
834  SparseMatrix sparse_matrix_value (bool frc_str_conv = false) const
835  { return rep->sparse_matrix_value (frc_str_conv); }
836 
838  sparse_complex_matrix_value (bool frc_str_conv = false) const
839  { return rep->sparse_complex_matrix_value (frc_str_conv); }
840 
841  SparseBoolMatrix sparse_bool_matrix_value (bool warn = false) const
842  { return rep->sparse_bool_matrix_value (warn); }
843 
844  DiagMatrix diag_matrix_value (bool force = false) const
845  { return rep->diag_matrix_value (force); }
846 
847  FloatDiagMatrix float_diag_matrix_value (bool force = false) const
848  { return rep->float_diag_matrix_value (force); }
849 
850  ComplexDiagMatrix complex_diag_matrix_value (bool force = false) const
851  { return rep->complex_diag_matrix_value (force); }
852 
854  float_complex_diag_matrix_value (bool force = false) const
855  { return rep->float_complex_diag_matrix_value (force); }
856 
858  { return rep->perm_matrix_value (); }
859 
861  { return rep->int8_scalar_value (); }
862 
864  { return rep->int16_scalar_value (); }
865 
867  { return rep->int32_scalar_value (); }
868 
870  { return rep->int64_scalar_value (); }
871 
873  { return rep->uint8_scalar_value (); }
874 
876  { return rep->uint16_scalar_value (); }
877 
879  { return rep->uint32_scalar_value (); }
880 
882  { return rep->uint64_scalar_value (); }
883 
885  { return rep->int8_array_value (); }
886 
888  { return rep->int16_array_value (); }
889 
891  { return rep->int32_array_value (); }
892 
894  { return rep->int64_array_value (); }
895 
897  { return rep->uint8_array_value (); }
898 
900  { return rep->uint16_array_value (); }
901 
903  { return rep->uint32_array_value (); }
904 
906  { return rep->uint64_array_value (); }
907 
908  std::string string_value (bool force = false) const
909  { return rep->string_value (force); }
910 
911  string_vector string_vector_value (bool pad = false) const
912  { return rep->string_vector_value (pad); }
913 
914  OCTAVE_DEPRECATED ("use 'string_vector_value' instead")
915  string_vector all_strings (bool pad = false) const
916  { return string_vector_value (pad); }
917 
918  Cell cell_value (void) const;
919 
921  { return rep->cellstr_value (); }
922 
923  Range range_value (void) const
924  { return rep->range_value (); }
925 
926  octave_map map_value (void) const;
927 
928  octave_scalar_map scalar_map_value (void) const;
929 
930  string_vector map_keys (void) const
931  { return rep->map_keys (); }
932 
933  size_t nparents (void) const
934  { return rep->nparents (); }
935 
936  std::list<std::string> parent_class_name_list (void) const
937  { return rep->parent_class_name_list (); }
938 
940  { return rep->parent_class_names (); }
941 
943  find_parent_class (const std::string& parent_class_name)
944  { return rep->find_parent_class (parent_class_name); }
945 
946  bool is_instance_of (const std::string& cls_name) const
947  { return rep->is_instance_of (cls_name); }
948 
949  octave_function *function_value (bool silent = false) const;
950 
951  octave_user_function *user_function_value (bool silent = false) const;
952 
953  octave_user_script *user_script_value (bool silent = false) const;
954 
955  octave_user_code *user_code_value (bool silent = false) const;
956 
957  octave_fcn_handle *fcn_handle_value (bool silent = false) const;
958 
959  octave_fcn_inline *fcn_inline_value (bool silent = false) const;
960 
961  octave_value_list list_value (void) const;
962 
963  ColumnVector column_vector_value (bool frc_str_conv = false,
964  bool frc_vec_conv = false) const;
965 
967  complex_column_vector_value (bool frc_str_conv = false,
968  bool frc_vec_conv = false) const;
969 
970  RowVector row_vector_value (bool frc_str_conv = false,
971  bool frc_vec_conv = false) const;
972 
974  complex_row_vector_value (bool frc_str_conv = false,
975  bool frc_vec_conv = false) const;
976 
977  FloatColumnVector float_column_vector_value (bool frc_str_conv = false,
978  bool frc_vec_conv = false) const;
979 
981  float_complex_column_vector_value (bool frc_str_conv = false,
982  bool frc_vec_conv = false) const;
983 
984  FloatRowVector float_row_vector_value (bool frc_str_conv = false,
985  bool frc_vec_conv = false) const;
986 
988  float_complex_row_vector_value (bool frc_str_conv = false,
989  bool frc_vec_conv = false) const;
990 
991  Array<int> int_vector_value (bool req_int = false,
992  bool frc_str_conv = false,
993  bool frc_vec_conv = false) const;
994 
996  octave_idx_type_vector_value (bool req_int = false,
997  bool frc_str_conv = false,
998  bool frc_vec_conv = false) const;
999 
1000  Array<double> vector_value (bool frc_str_conv = false,
1001  bool frc_vec_conv = false) const;
1002 
1003  Array<Complex> complex_vector_value (bool frc_str_conv = false,
1004  bool frc_vec_conv = false) const;
1005 
1006  Array<float> float_vector_value (bool frc_str_conv = false,
1007  bool frc_vec_conv = false) const;
1008 
1010  float_complex_vector_value (bool frc_str_conv = false,
1011  bool frc_vec_conv = false) const;
1012 
1013  // Extract values of specific types without any implicit type conversions.
1014  // Throw an error if an object is the wrong type for the requested value
1015  // extraction.
1016  //
1017  // These functions are intended to provide a simple way to extract values of
1018  // specific types and display error messages that are more meaningful than
1019  // the generic "error: wrong type argument 'cell'" message.
1020 
1021  short int xshort_value (const char *fmt, ...) const;
1022 
1023  unsigned short int xushort_value (const char *fmt, ...) const;
1024 
1025  int xint_value (const char *fmt, ...) const;
1026 
1027  unsigned int xuint_value (const char *fmt, ...) const;
1028 
1029  int xnint_value (const char *fmt, ...) const;
1030 
1031  long int xlong_value (const char *fmt, ...) const;
1032 
1033  unsigned long int xulong_value (const char *fmt, ...) const;
1034 
1035  int64_t xint64_value (const char *fmt, ...) const;
1036 
1037  uint64_t xuint64_value (const char *fmt, ...) const;
1038 
1039  octave_idx_type xidx_type_value (const char *fmt, ...) const;
1040 
1041  double xdouble_value (const char *fmt, ...) const;
1042 
1043  float xfloat_value (const char *fmt, ...) const;
1044 
1045  double xscalar_value (const char *fmt, ...) const;
1046 
1047  float xfloat_scalar_value (const char *fmt, ...) const;
1048 
1049  Matrix xmatrix_value (const char *fmt, ...) const;
1050 
1051  FloatMatrix xfloat_matrix_value (const char *fmt, ...) const;
1052 
1053  NDArray xarray_value (const char *fmt, ...) const;
1054 
1055  FloatNDArray xfloat_array_value (const char *fmt, ...) const;
1056 
1057  Complex xcomplex_value (const char *fmt, ...) const;
1058 
1059  FloatComplex xfloat_complex_value (const char *fmt, ...) const;
1060 
1061  ComplexMatrix xcomplex_matrix_value (const char *fmt, ...) const;
1062 
1063  FloatComplexMatrix xfloat_complex_matrix_value (const char *fmt, ...) const;
1064 
1065  ComplexNDArray xcomplex_array_value (const char *fmt, ...) const;
1066 
1067  FloatComplexNDArray xfloat_complex_array_value (const char *fmt, ...) const;
1068 
1069  bool xbool_value (const char *fmt, ...) const;
1070 
1071  boolMatrix xbool_matrix_value (const char *fmt, ...) const;
1072 
1073  boolNDArray xbool_array_value (const char *fmt, ...) const;
1074 
1075  charMatrix xchar_matrix_value (const char *fmt, ...) const;
1076 
1077  charNDArray xchar_array_value (const char *fmt, ...) const;
1078 
1079  SparseMatrix xsparse_matrix_value (const char *fmt, ...) const;
1080 
1081  SparseComplexMatrix xsparse_complex_matrix_value (const char *fmt, ...) const;
1082 
1083  SparseBoolMatrix xsparse_bool_matrix_value (const char *fmt, ...) const;
1084 
1085  DiagMatrix xdiag_matrix_value (const char *fmt, ...) const;
1086 
1087  FloatDiagMatrix xfloat_diag_matrix_value (const char *fmt, ...) const;
1088 
1089  ComplexDiagMatrix xcomplex_diag_matrix_value (const char *fmt, ...) const;
1090 
1091  FloatComplexDiagMatrix xfloat_complex_diag_matrix_value (const char *fmt, ...) const;
1092 
1093  PermMatrix xperm_matrix_value (const char *fmt, ...) const;
1094 
1095  octave_int8 xint8_scalar_value (const char *fmt, ...) const;
1096 
1097  octave_int16 xint16_scalar_value (const char *fmt, ...) const;
1098 
1099  octave_int32 xint32_scalar_value (const char *fmt, ...) const;
1100 
1101  octave_int64 xint64_scalar_value (const char *fmt, ...) const;
1102 
1103  octave_uint8 xuint8_scalar_value (const char *fmt, ...) const;
1104 
1105  octave_uint16 xuint16_scalar_value (const char *fmt, ...) const;
1106 
1107  octave_uint32 xuint32_scalar_value (const char *fmt, ...) const;
1108 
1109  octave_uint64 xuint64_scalar_value (const char *fmt, ...) const;
1110 
1111  int8NDArray xint8_array_value (const char *fmt, ...) const;
1112 
1113  int16NDArray xint16_array_value (const char *fmt, ...) const;
1114 
1115  int32NDArray xint32_array_value (const char *fmt, ...) const;
1116 
1117  int64NDArray xint64_array_value (const char *fmt, ...) const;
1118 
1119  uint8NDArray xuint8_array_value (const char *fmt, ...) const;
1120 
1121  uint16NDArray xuint16_array_value (const char *fmt, ...) const;
1122 
1123  uint32NDArray xuint32_array_value (const char *fmt, ...) const;
1124 
1125  uint64NDArray xuint64_array_value (const char *fmt, ...) const;
1126 
1127  std::string xstring_value (const char *fmt, ...) const;
1128 
1129  string_vector xstring_vector_value (const char *fmt, ...) const;
1130 
1131  Cell xcell_value (const char *fmt, ...) const;
1132 
1133  Array<std::string> xcellstr_value (const char *fmt, ...) const;
1134 
1135  Range xrange_value (const char *fmt, ...) const;
1136 
1137  octave_map xmap_value (const char *fmt, ...) const;
1138 
1139  octave_scalar_map xscalar_map_value (const char *fmt, ...) const;
1140 
1141  ColumnVector xcolumn_vector_value (const char *fmt, ...) const;
1142 
1144  xcomplex_column_vector_value (const char *fmt, ...) const;
1145 
1146  RowVector xrow_vector_value (const char *fmt, ...) const;
1147 
1148  ComplexRowVector xcomplex_row_vector_value (const char *fmt, ...) const;
1149 
1150  FloatColumnVector xfloat_column_vector_value (const char *fmt, ...) const;
1151 
1153  xfloat_complex_column_vector_value (const char *fmt, ...) const;
1154 
1155  FloatRowVector xfloat_row_vector_value (const char *fmt, ...) const;
1156 
1158  xfloat_complex_row_vector_value (const char *fmt, ...) const;
1159 
1160  Array<int> xint_vector_value (const char *fmt, ...) const;
1161 
1163  xoctave_idx_type_vector_value (const char *fmt, ...) const;
1164 
1165  Array<double> xvector_value (const char *fmt, ...) const;
1166 
1167  Array<Complex> xcomplex_vector_value (const char *fmt, ...) const;
1168 
1169  Array<float> xfloat_vector_value (const char *fmt, ...) const;
1170 
1171  Array<FloatComplex> xfloat_complex_vector_value (const char *fmt, ...) const;
1172 
1173  octave_function *xfunction_value (const char *fmt, ...) const;
1174  octave_user_function *xuser_function_value (const char *fmt, ...) const;
1175  octave_user_script *xuser_script_value (const char *fmt, ...) const;
1176  octave_user_code *xuser_code_value (const char *fmt, ...) const;
1177  octave_fcn_handle *xfcn_handle_value (const char *fmt, ...) const;
1178  octave_fcn_inline *xfcn_inline_value (const char *fmt, ...) const;
1179 
1180  octave_value_list xlist_value (const char *fmt, ...) const;
1181 
1182  // Possibly economize a lazy-indexed value.
1183 
1184  void maybe_economize (void)
1185  { rep->maybe_economize (); }
1186 
1187  // The following two hook conversions are called on any octave_value prior to
1188  // storing it to a "permanent" location, like a named variable, a cell or a
1189  // struct component, or a return value of a function.
1190 
1191  octave_value storable_value (void) const;
1192 
1193  // Ditto, but in place, i.e., equivalent to *this = this->storable_value (),
1194  // but possibly more efficient.
1195 
1196  void make_storable_value (void);
1197 
1198  // FIXME: These should probably be private.
1199  // Conversions. If a user of this class wants a certain kind of constant,
1200  // he should simply ask for it, and we should convert it if possible.
1201 
1202  octave_value convert_to_str (bool pad = false, bool force = false,
1203  char type = '\'') const
1204  { return rep->convert_to_str (pad, force, type); }
1205 
1206  octave_value
1207  convert_to_str_internal (bool pad, bool force, char type) const
1208  { return rep->convert_to_str_internal (pad, force, type); }
1209 
1211  { rep->convert_to_row_or_column_vector (); }
1212 
1213  bool print_as_scalar (void) const
1214  { return rep->print_as_scalar (); }
1215 
1216  void print (std::ostream& os, bool pr_as_read_syntax = false)
1217  { rep->print (os, pr_as_read_syntax); }
1218 
1219  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const
1220  { rep->print_raw (os, pr_as_read_syntax); }
1221 
1222  bool print_name_tag (std::ostream& os, const std::string& name) const
1223  { return rep->print_name_tag (os, name); }
1224 
1225  void print_with_name (std::ostream& os, const std::string& name) const
1226  { rep->print_with_name (os, name, true); }
1227 
1228  void short_disp (std::ostream& os) const { rep->short_disp (os); }
1229 
1230  int type_id (void) const { return rep->type_id (); }
1231 
1232  std::string type_name (void) const { return rep->type_name (); }
1233 
1234  std::string class_name (void) const { return rep->class_name (); }
1235 
1236  // Unary and binary operations.
1237 
1238  friend OCTINTERP_API octave_value do_unary_op (unary_op op,
1239  const octave_value& a);
1240 
1241  octave_value& do_non_const_unary_op (unary_op op);
1242 
1243  octave_value& do_non_const_unary_op (unary_op op, const std::string& type,
1244  const std::list<octave_value_list>& idx);
1245 
1246  friend OCTINTERP_API octave_value do_binary_op (binary_op op,
1247  const octave_value& a,
1248  const octave_value& b);
1249 
1250  friend OCTINTERP_API octave_value do_binary_op (compound_binary_op op,
1251  const octave_value& a,
1252  const octave_value& b);
1253 
1255  const octave_value& b,
1257 
1259  const octave_value& limit,
1260  bool is_for_cmd_expr)
1261  {
1262  return do_colon_op (base, octave_value (), limit, is_for_cmd_expr);
1263  }
1264 
1265  friend OCTINTERP_API octave_value do_colon_op (const octave_value& base,
1266  const octave_value& increment,
1267  const octave_value& limit,
1268  bool is_for_cmd_expr);
1269 
1270  const octave_base_value& get_rep (void) const { return *rep; }
1271 
1272  bool is_copy_of (const octave_value &val) const { return rep == val.rep; }
1273 
1274  void print_info (std::ostream& os,
1275  const std::string& prefix = "") const;
1276 
1277  bool save_ascii (std::ostream& os) { return rep->save_ascii (os); }
1278 
1279  bool load_ascii (std::istream& is) { return rep->load_ascii (is); }
1280 
1281  bool save_binary (std::ostream& os, bool& save_as_floats)
1282  { return rep->save_binary (os, save_as_floats); }
1283 
1284  bool load_binary (std::istream& is, bool swap,
1286  { return rep->load_binary (is, swap, fmt); }
1287 
1288  bool save_hdf5 (octave_hdf5_id loc_id, const char *name,
1289  bool save_as_floats)
1290  { return rep->save_hdf5 (loc_id, name, save_as_floats); }
1291 
1292  bool load_hdf5 (octave_hdf5_id loc_id, const char *name)
1293  { return rep->load_hdf5 (loc_id, name); }
1294 
1295  int write (octave_stream& os, int block_size,
1296  oct_data_conv::data_type output_type, int skip,
1298 
1299  octave_base_value *internal_rep (void) const { return rep; }
1300 
1301  // Unsafe. These functions exist to support the MEX interface.
1302  // You should not use them anywhere else.
1303  void *mex_get_data (void) const { return rep->mex_get_data (); }
1304 
1305  octave_idx_type *mex_get_ir (void) const { return rep->mex_get_ir (); }
1306 
1307  octave_idx_type *mex_get_jc (void) const { return rep->mex_get_jc (); }
1308 
1309  mxArray *as_mxArray (void) const { return rep->as_mxArray (); }
1310 
1312  { return rep->diag (k); }
1313 
1315  { return rep->diag (m, n); }
1316 
1318  { return rep->sort (dim, mode); }
1320  sortmode mode = ASCENDING) const
1321  { return rep->sort (sidx, dim, mode); }
1322 
1324  { return rep->is_sorted (mode); }
1325 
1327  { return rep->sort_rows_idx (mode); }
1328 
1330  { return rep->is_sorted_rows (mode); }
1331 
1332  void lock (void) { rep->lock (); }
1333 
1334  void unlock (void) { rep->unlock (); }
1335 
1336  bool islocked (void) const { return rep->islocked (); }
1337 
1338  void dump (std::ostream& os) const { rep->dump (os); }
1339 
1340 #define MAPPER_FORWARD(F) \
1341  octave_value F (void) const \
1342  { \
1343  return rep->map (octave_base_value::umap_ ## F); \
1344  }
1345 
1369  MAPPER_FORWARD (isfinite)
1391 
1392  // These functions are prefixed with X to avoid potential macro conflicts.
1393 
1394  MAPPER_FORWARD (xisalnum)
1395  MAPPER_FORWARD (xisalpha)
1397  MAPPER_FORWARD (xiscntrl)
1398  MAPPER_FORWARD (xisdigit)
1399  MAPPER_FORWARD (xisgraph)
1400  MAPPER_FORWARD (xislower)
1401  MAPPER_FORWARD (xisprint)
1402  MAPPER_FORWARD (xispunct)
1403  MAPPER_FORWARD (xisspace)
1404  MAPPER_FORWARD (xisupper)
1405  MAPPER_FORWARD (xisxdigit)
1406  MAPPER_FORWARD (xsignbit)
1408  MAPPER_FORWARD (xtolower)
1409  MAPPER_FORWARD (xtoupper)
1410 
1411 #undef MAPPER_FORWARD
1412 
1414  { return rep->map (umap); }
1415 
1416  // Extract the n-th element, aka val(n).
1417  // Result is undefined if val is not an array type or n is out of range.
1418  // Never error.
1419  octave_value
1421  { return rep->fast_elem_extract (n); }
1422 
1423  // Assign the n-th element, aka val(n) = x.
1424  // Return false if val is not an array type, x is not a matching scalar type,
1425  // or n is out of range.
1426  // Never error.
1427  virtual bool
1429  {
1430  make_unique ();
1431  return rep->fast_elem_insert (n, x);
1432  }
1433 
1434 protected:
1435 
1436  // The real representation.
1438 
1439 private:
1440 
1441  static octave_base_value *nil_rep (void);
1442 
1443  assign_op unary_op_to_assign_op (unary_op op);
1444 
1445  binary_op op_eq_to_binary_op (assign_op op);
1446 
1447  // This declaration protects against constructing octave_value from
1448  // const octave_base_value* which actually silently calls octave_value (bool).
1449  octave_value (const octave_base_value *);
1450 
1451 };
1452 
1453 // Publish externally used friend functions.
1454 
1457 
1460  const octave_value& a, const octave_value& b);
1461 
1464  const octave_value& a, const octave_value& b);
1465 
1466 #define OV_UNOP_FN(name) \
1467  inline octave_value \
1468  name (const octave_value& a) \
1469  { \
1470  return do_unary_op (octave_value::name, a); \
1471  }
1472 
1473 #define OV_UNOP_OP(name, op) \
1474  inline octave_value \
1475  operator op (const octave_value& a) \
1476  { \
1477  return name (a); \
1478  }
1479 
1480 #define OV_UNOP_FN_OP(name, op) \
1481  OV_UNOP_FN (name) \
1482  OV_UNOP_OP (name, op)
1483 
1487 
1490 
1491 // No simple way to define these for prefix and suffix ops?
1492 //
1493 // incr
1494 // decr
1495 
1496 #define OV_BINOP_FN(name) \
1497  inline octave_value \
1498  name (const octave_value& a1, const octave_value& a2) \
1499  { \
1500  return do_binary_op (octave_value::name, a1, a2); \
1501  }
1502 
1503 #define OV_BINOP_OP(name, op) \
1504  inline octave_value \
1505  operator op (const octave_value& a1, const octave_value& a2) \
1506  { \
1507  return name (a1, a2); \
1508  }
1509 
1510 #define OV_BINOP_FN_OP(name, op) \
1511  OV_BINOP_FN (name) \
1512  OV_BINOP_OP (name, op)
1513 
1518 
1521 
1528 
1535 
1537 
1538 #define OV_COMP_BINOP_FN(name) \
1539  inline octave_value \
1540  name (const octave_value& a1, const octave_value& a2) \
1541  { \
1542  return do_binary_op (octave_value::name, a1, a2); \
1543  }
1544 
1549 
1550 extern OCTINTERP_API void install_types (void);
1551 
1552 // Templated value extractors.
1553 template <typename Value>
1554 inline Value octave_value_extract (const octave_value&)
1555 { assert (false); }
1556 
1557 #define DEF_VALUE_EXTRACTOR(VALUE,MPREFIX) \
1558  template <> \
1559  inline VALUE octave_value_extract<VALUE> (const octave_value& v) \
1560  { \
1561  return v.MPREFIX ## _value (); \
1562  }
1563 
1565 DEF_VALUE_EXTRACTOR (float, float_scalar)
1569 
1578 
1584 
1594 
1600 
1604 DEF_VALUE_EXTRACTOR (FloatComplexColumnVector, float_complex_column_vector)
1605 
1609 DEF_VALUE_EXTRACTOR (FloatComplexRowVector, float_complex_row_vector)
1610 
1614 DEF_VALUE_EXTRACTOR (FloatComplexDiagMatrix, float_complex_diag_matrix)
1616 
1620 #undef DEF_VALUE_EXTRACTOR
1621 
1622 #define DEF_DUMMY_VALUE_EXTRACTOR(VALUE,DEFVAL) \
1623  template <> \
1624  inline VALUE octave_value_extract<VALUE> (const octave_value&) \
1625  { \
1626  assert (false); \
1627  return DEFVAL; \
1628  }
1629 
1632 #undef DEF_DUMMY_VALUE_EXTRACTOR
1633 
1634 #endif
sortmode is_sorted_rows(sortmode mode=UNSORTED) const
Definition: ov.h:1329
uint8NDArray uint8_array_value(void) const
Definition: ov.h:896
void short_disp(std::ostream &os) const
Definition: ov.h:1228
bool is_builtin_function(void) const
Definition: ov.h:723
bool is_object(void) const
Definition: ov.h:593
octave_idx_type nnz(void) const
Definition: ov.h:509
octave_value op_mul_trans(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1546
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
Definition: ov.h:812
bool is_range(void) const
Definition: ov.h:587
FloatComplexDiagMatrix float_complex_diag_matrix_value(bool force=false) const
Definition: ov.h:854
octave_value(void)
Definition: ov.h:169
Definition: Cell.h:37
octave_value op_uplus(const octave_value &a)
Definition: ov.h:1485
size_t nparents(void) const
Definition: ov.h:933
charNDArray char_array_value(bool frc_str_conv=false) const
Definition: ov.h:831
octave_refcount< octave_idx_type > count
Definition: ov-base.h:843
bool is_real_type(void) const
Definition: ov.h:667
octave_value as_uint16(void) const
Definition: ov.h:400
assign_op
Definition: ov.h:131
boolMatrix bool_matrix_value(bool warn=false) const
Definition: ov.h:822
#define OV_BINOP_FN_OP(name, op)
Definition: ov.h:1510
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
Definition: ov.h:417
octave_value op_el_pow(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1531
bool print_name_tag(std::ostream &os, const std::string &name) const
Definition: ov.h:1222
octave_value as_int64(void) const
Definition: ov.h:397
#define C(a, b)
Definition: Faddeeva.cc:246
int ndims(void) const
Definition: ov.h:495
const octave_base_value const Array< octave_idx_type > & ra_idx
octave_value reshape(const dim_vector &dv) const
Definition: ov.h:515
octave_idx_type rows(void) const
Definition: ov.h:489
octave_value permute(const Array< int > &vec, bool inv=false) const
Definition: ov.h:518
octave_value do_cat_op(const octave_value &v1, const octave_value &v2, const Array< octave_idx_type > &ra_idx)
Definition: ov.cc:2456
The value of lines which begin with a space character are not saved in the history list A value of all commands are saved on the history list
Definition: oct-hist.cc:728
octave_int16 int16_scalar_value(void) const
Definition: ov.h:863
octave_value op_eq(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1524
octave_value full_value(void) const
Definition: ov.h:386
unsigned int uint_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:750
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
Definition: ov.h:1288
int8NDArray int8_array_value(void) const
Definition: ov.h:884
nd group nd example oindent but is performed more efficiently If only and it is a scalar
Definition: data.cc:5342
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Sort by rows returns only indices.
Definition: Array.cc:2087
function erf(X)
Definition: erf.f:2
FloatComplexMatrix float_complex_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:809
octave_base_value * empty_clone(void) const
Definition: ov.h:316
mxArray * as_mxArray(void) const
Definition: ov.h:1309
bool is_uint16_type(void) const
Definition: ov.h:650
bool islocked(void) const
Definition: ov.h:1336
bool is_user_code(void) const
Definition: ov.h:720
sortmode
Definition: oct-sort.h:105
bool is_function(void) const
Definition: ov.h:711
std::complex< double > erfi(std::complex< double > z, double relerr=0)
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:5068
int16NDArray int16_array_value(void) const
Definition: ov.h:887
MatrixType matrix_type(const MatrixType &typ) const
Definition: ov.h:530
static int xtoascii(int c)
Definition: ov-ch-mat.cc:250
octave_idx_type nfields(void) const
Definition: ov.h:513
std::list< std::string > parent_class_name_list(void) const
Definition: ov.h:936
Return the CPU time used by your Octave session The first output is the total time spent executing your process and is equal to the sum of second and third which are the number of CPU seconds spent executing in user mode and the number of CPU seconds spent executing in system mode
Definition: data.cc:6386
idx subsref(val, idx) esult
Definition: ov.cc:3080
bool is_scalar_type(void) const
Definition: ov.h:673
octave_value diag(octave_idx_type k=0) const
Definition: ov.h:1311
bool is_numeric_type(void) const
Definition: ov.h:679
bool is_defined(void) const
Definition: ov.h:536
bool isnan(double x)
Definition: lo-mappers.cc:347
octave_value op_el_ldiv(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1532
for large enough k
Definition: lu.cc:606
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the then the first element defines the pivoting tolerance for the unsymmetric the values defined such that for full matrix
Definition: lu.cc:138
bool is_complex_scalar(void) const
Definition: ov.h:557
int int_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:746
Definition: Range.h:33
uint64NDArray uint64_array_value(void) const
Definition: ov.h:905
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the base of natural logarithms The constant ex $e satisfies the equation log(e)
double ceil(double x)
Definition: lo-mappers.h:138
binary_op
Definition: ov.h:89
int64_t int64_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:765
octave_value eval(void)
Definition: ov.h:736
function atanh(X)
Definition: atanh.f:2
octave_int32 int32_scalar_value(void) const
Definition: ov.h:866
float float_value(bool frc_str_conv=false) const
Definition: ov.h:778
int32NDArray int32_array_value(void) const
Definition: ov.h:890
bool is_perm_matrix(void) const
Definition: ov.h:575
bool is_int8_type(void) const
Definition: ov.h:635
STL namespace.
octave_value map(octave_base_value::unary_mapper_t umap) const
Definition: ov.h:1413
int type_id(void) const
Definition: ov.h:1230
octave_value as_double(void) const
Definition: ov.h:391
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Definition: ov.h:1326
void make_unique(void)
Definition: ov.h:327
size_type size(const size_type d) const
Size of the specified dimension.
Definition: Array.h:428
octave_value op_pow(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1519
octave_base_value * try_narrowing_conversion(void)
Definition: ov.h:404
octave::mach_info::float_format flt_fmt
Definition: load-save.cc:723
octave_value resize(const dim_vector &dv, bool fill=false) const
Definition: ov.h:524
bool is_cell(void) const
Definition: ov.h:545
float float_scalar_value(bool frc_str_conv=false) const
Definition: ov.h:784
Complex acos(const Complex &x)
Definition: lo-mappers.cc:90
octave_idx_type nzmax(void) const
Definition: ov.h:511
octave_value as_int32(void) const
Definition: ov.h:396
octave_value convert_to_str_internal(bool pad, bool force, char type) const
Definition: ov.h:1207
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
Definition: ov-usr-fcn.cc:935
double expm1(double x)
Definition: lo-specfun.cc:473
bool is_int32_type(void) const
Definition: ov.h:641
bool is_copy_of(const octave_value &val) const
Definition: ov.h:1272
octave_value as_uint8(void) const
Definition: ov.h:399
double fix(double x)
Definition: lo-mappers.h:158
double scalar_value(bool frc_str_conv=false) const
Definition: ov.h:781
s
Definition: file-io.cc:2682
Complex asin(const Complex &x)
Definition: lo-mappers.cc:150
#define DEF_VALUE_EXTRACTOR(VALUE, MPREFIX)
Definition: ov.h:1557
builtin_type_t
Definition: ov-base.h:61
ComplexDiagMatrix complex_diag_matrix_value(bool force=false) const
Definition: ov.h:850
double cbrt(double x)
Definition: lo-specfun.cc:648
boolNDArray bool_array_value(bool warn=false) const
Definition: ov.h:825
bool is_function_handle(void) const
Definition: ov.h:702
octave_value arg
Definition: pr-output.cc:3440
double round(double x)
Definition: lo-mappers.cc:333
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
octave_base_value * rep
Definition: ov.h:1437
bool is_instance_of(const std::string &cls_name) const
Definition: ov.h:946
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:398
octave_value ipermute(const Array< int > &vec) const
Definition: ov.h:521
int64NDArray int64_array_value(void) const
Definition: ov.h:893
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx, bool auto_add)
Definition: ov.h:421
bool swap
Definition: load-save.cc:725
sortmode is_sorted(sortmode mode=UNSORTED) const
Definition: ov.h:1323
idx_vector index_vector(bool require_integers=false) const
Definition: ov.h:479
bool is_float_type(void) const
Definition: ov.h:630
void lock(void)
Definition: ov.h:1332
octave_base_value::type_conv_info numeric_demotion_function(void) const
Definition: ov.h:377
Array< std::string > cellstr_value(void) const
Definition: ov.h:920
octave_value op_div(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1517
octave_value any(int dim=0) const
Definition: ov.h:616
octave_value op_el_or(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1534
octave_idx_type columns(void) const
Definition: ov.h:491
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:216
long int long_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:757
bool is_dld_function(void) const
Definition: ov.h:726
virtual octave_base_value * try_narrowing_conversion(void)
Definition: ov-base.h:258
FloatNDArray float_array_value(bool frc_str_conv=false) const
Definition: ov.h:796
#define OV_UNOP_FN(name)
Definition: ov.h:1466
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable name
Definition: input.cc:871
void dump(std::ostream &os) const
Definition: ov.h:1338
bool is_char_matrix(void) const
Definition: ov.h:569
virtual octave_base_value * find_parent_class(const std::string &)
Definition: ov-base.h:602
octave_value as_single(void) const
Definition: ov.h:392
Complex atan(const Complex &x)
Definition: lo-mappers.cc:210
bool is_mex_function(void) const
Definition: ov.h:729
unsigned long int ulong_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:761
octave_uint8 uint8_scalar_value(void) const
Definition: ov.h:872
bool is_null_value(void) const
Definition: ov.h:608
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
Definition: ov-usr-fcn.cc:935
octave_value as_int16(void) const
Definition: ov.h:395
#define OCTINTERP_API
Definition: mexproto.h:69
octave_value convert_to_str(bool pad=false, bool force=false, char type= '\'') const
Definition: ov.h:1202
bool print_as_scalar(void) const
Definition: ov.h:1213
bool is_complex_matrix(void) const
Definition: ov.h:560
uint64_t uint64_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:769
octave_value op_not(const octave_value &a)
Definition: ov.h:1484
bool is_sparse_type(void) const
Definition: ov.h:682
octave_value squeeze(void) const
Definition: ov.h:382
octave_value as_int8(void) const
Definition: ov.h:394
octave_idx_type numel(const octave_value_list &idx)
Definition: ov.h:411
bool is_bool_type(void) const
Definition: ov.h:661
function asinh(X)
Definition: asinh.f:2
bool is_real_scalar(void) const
Definition: ov.h:551
octave_idx_type * mex_get_jc(void) const
Definition: ov.h:1307
bool is_bool_matrix(void) const
Definition: ov.h:566
void print(std::ostream &os, bool pr_as_read_syntax=false)
Definition: ov.h:1216
std::string string_value(bool force=false) const
Definition: ov.h:908
FloatDiagMatrix float_diag_matrix_value(bool force=false) const
Definition: ov.h:847
nd deftypefn *octave_map m
Definition: ov-struct.cc:2058
#define DEF_DUMMY_VALUE_EXTRACTOR(VALUE, DEFVAL)
Definition: ov.h:1622
then the function must return scalars which will be concatenated into the return array(s).If code
Definition: cellfun.cc:398
octave_value op_trans_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1545
int nint_value(bool frc_str_conv=false) const
Definition: ov.h:753
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
Definition: ov.h:1292
FloatComplex float_complex_value(bool frc_str_conv=false) const
Definition: ov.h:802
octave_base_value::type_conv_info numeric_conversion_function(void) const
Definition: ov.h:374
Range range_value(void) const
Definition: ov.h:923
octave_value op_transpose(const octave_value &a)
Definition: ov.h:1488
bool is_matrix_type(void) const
Definition: ov.h:676
returns the type of the matrix and caches it for future use Called with more than one argument
Definition: matrix_type.cc:120
Value octave_value_extract(const octave_value &)
Definition: ov.h:1554
double signum(double x)
Definition: lo-mappers.h:259
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
Definition: ov.h:816
bool is_string(void) const
Definition: ov.h:578
bool is_double_type(void) const
Definition: ov.h:624
bool save_binary(std::ostream &os, bool &save_as_floats)
Definition: ov.h:1281
void maybe_economize(void)
Definition: ov.h:1184
float dawson(float x)
Definition: lo-specfun.cc:307
bool save_as_floats
Definition: load-save.cc:1581
octave_value as_uint32(void) const
Definition: ov.h:401
SparseBoolMatrix sparse_bool_matrix_value(bool warn=false) const
Definition: ov.h:841
bool is_inline_function(void) const
Definition: ov.h:708
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
Definition: ov.h:1219
octave_value op_el_and(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1533
bool is_complex_type(void) const
Definition: ov.h:670
is false
Definition: cellfun.cc:398
bool is_magic_colon(void) const
Definition: ov.h:605
bool is_int64_type(void) const
Definition: ov.h:644
virtual octave_base_value * empty_clone(void) const
Definition: ov-base.cc:122
octave_base_value * find_parent_class(const std::string &parent_class_name)
Definition: ov.h:943
bool is_cellstr(void) const
Definition: ov.h:548
octave_idx_type * mex_get_ir(void) const
Definition: ov.h:1305
octave_value op_mul_herm(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1548
bool all_zero_dims(void) const
Definition: ov.h:497
std::complex< double > erfcx(std::complex< double > z, double relerr=0)
int64_t octave_hdf5_id
bool is_user_script(void) const
Definition: ov.h:714
string_vector map_keys(void) const
Definition: ov.h:930
idx type
Definition: ov.cc:3129
Definition: dMatrix.h:37
octave_value all(int dim=0) const
Definition: ov.h:613
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138
SparseComplexMatrix sparse_complex_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:838
string_vector parent_class_names(void) const
Definition: ov.h:939
the exceeded dimensions are set to if fewer subscripts than dimensions are the exceeding dimensions are merged into the final requested dimension For consider the following dims
Definition: sub2ind.cc:255
dim_vector dims(void) const
Definition: ov.h:486
string_vector string_vector_value(bool pad=false) const
Definition: ov.h:911
Matrix matrix_value(bool frc_str_conv=false) const
Definition: ov.h:787
OCTINTERP_API octave_value do_unary_op(octave_value::unary_op op, const octave_value &a)
Definition: ov.cc:2645
octave_value op_le(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1523
octave_value op_lt(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1522
void erase_subfunctions(void)
Definition: ov.h:732
may be zero for pure relative error test tem the relative tolerance must be greater than or equal to
Definition: Quad-opts.cc:233
octave_idx_type numel(void) const
Definition: ov.h:499
#define OV_COMP_BINOP_FN(name)
Definition: ov.h:1538
bool is_defined(void) const
Definition: oct-lvalue.h:68
double erfcinv(double x)
Definition: lo-specfun.cc:3049
charMatrix char_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:828
bool is_classdef_object(void) const
Definition: ov.h:596
bool isinf(double x)
Definition: lo-mappers.cc:387
octave_value op_el_div(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1530
function acosh(X)
Definition: acosh.f:2
virtual octave_base_value * unique_clone(void)
Definition: ov-base.h:231
OCTINTERP_API octave_value do_binary_op(octave_value::binary_op op, const octave_value &a, const octave_value &b)
Definition: ov.cc:2214
bool is_int16_type(void) const
Definition: ov.h:638
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable or any other valid Octave code The number of return their and their class depend on the expression entered If you are only interested in getting a literal string value you can call ode directly
bool save_ascii(std::ostream &os)
Definition: ov.h:1277
bool is_map(void) const
Definition: ov.h:590
MatrixType matrix_type(void) const
Definition: ov.h:527
DiagMatrix diag_matrix_value(bool force=false) const
Definition: ov.h:844
#define OV_BINOP_FN(name)
Definition: ov.h:1496
bool is_true(void) const
Definition: ov.h:687
unsigned short int ushort_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:743
magic_colon
Definition: ov.h:167
std::string type_name(void) const
Definition: ov.h:1232
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
Definition: ov.h:1317
bool is_bool_scalar(void) const
Definition: ov.h:563
bool is_empty(void) const
Definition: ov.h:542
~octave_value(void)
Definition: ov.h:321
bool is_sq_string(void) const
Definition: ov.h:581
NDArray array_value(bool frc_str_conv=false) const
Definition: ov.h:793
octave_int8 int8_scalar_value(void) const
Definition: ov.h:860
void assign(octave_value::assign_op, const octave_value &)
Definition: oct-lvalue.cc:33
void * mex_get_data(void) const
Definition: ov.h:1303
octave_value op_ne(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1527
void unlock(void)
Definition: ov.h:1334
bool load_ascii(std::istream &is)
Definition: ov.h:1279
bool is_dq_string(void) const
Definition: ov.h:584
bool bool_value(bool warn=false) const
Definition: ov.h:819
=val(i)}if ode{val(i)}occurs in table i
Definition: lookup.cc:239
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:805
double log1p(double x)
Definition: lo-specfun.cc:587
OCTAVE_EXPORT octave_value_list return the value of the option it must match the dimension of the state and the relative tolerance must also be a vector of the same length tem it must match the dimension of the state and the absolute tolerance must also be a vector of the same length The local error test applied at each integration step is xample roup abs(local error in x(i))<
bool is_uint8_type(void) const
Definition: ov.h:647
const octave_base_value & get_rep(void) const
Definition: ov.h:1270
p
Definition: lu.cc:138
function gamma(X)
Definition: gamma.f:2
bool is_cs_list(void) const
Definition: ov.h:602
Complex complex_value(bool frc_str_conv=false) const
Definition: ov.h:799
std::list< octave_value_list > idx
Definition: oct-lvalue.h:109
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:790
idx subsasgn(val, idx, 0) esult
Definition: ov.cc:3129
Matrix size(void)
Definition: ov.h:408
OCTINTERP_API void install_types(void)
Definition: ov.cc:2909
compound_binary_op
Definition: ov.h:114
void print_with_name(std::ostream &os, const std::string &name) const
Definition: ov.h:1225
bool is_anonymous_function(void) const
Definition: ov.h:705
double roundb(double x)
Definition: lo-mappers.h:189
std::string class_name(void) const
Definition: ov.h:1234
octave_value op_struct_ref(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1536
octave_int64 int64_scalar_value(void) const
Definition: ov.h:869
b
Definition: cellfun.cc:398
octave_idx_type get_count(void) const
Definition: ov.h:372
bool is_constant(void) const
Definition: ov.h:699
bool is_user_function(void) const
Definition: ov.h:717
octave_value op_add(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1514
bool is_undefined(void) const
Definition: ov.h:539
void make_unique(int obsolete_copies)
Definition: ov.h:343
bool is_uint64_type(void) const
Definition: ov.h:656
octave_value op_ldiv(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1520
double erfinv(double x)
Definition: lo-specfun.cc:2960
octave_value diag(octave_idx_type m, octave_idx_type n) const
Definition: ov.h:1314
ColumnVector imag(const ComplexColumnVector &a)
Definition: dColVector.cc:142
octave_uint64 uint64_scalar_value(void) const
Definition: ov.h:881
octave_value op_sub(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1515
octave_value fast_elem_extract(octave_idx_type n) const
Definition: ov.h:1420
double floor(double x)
Definition: lo-mappers.cc:330
std::complex< float > FloatComplex
Definition: oct-cmplx.h:32
virtual bool fast_elem_insert(octave_idx_type n, const octave_value &x)
Definition: ov.h:1428
PermMatrix perm_matrix_value(void) const
Definition: ov.h:857
SparseMatrix sparse_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:834
octave_value op_el_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1529
octave_value op_herm_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1547
double lgamma(double x)
Definition: lo-specfun.cc:353
std::complex< double > Complex
Definition: oct-cmplx.h:31
#define MAPPER_FORWARD(F)
Definition: ov.h:1340
octave_value sort(Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
Definition: ov.h:1319
#define OV_UNOP_FN_OP(name, op)
Definition: ov.h:1480
bool is_single_type(void) const
Definition: ov.h:627
octave_value op_hermitian(const octave_value &a)
Definition: ov.h:1489
octave_base_value * internal_rep(void) const
Definition: ov.h:1299
ColumnVector real(const ComplexColumnVector &a)
Definition: dColVector.cc:136
double double_value(bool frc_str_conv=false) const
Definition: ov.h:775
bool is_java(void) const
Definition: ov.h:599
write the output to stdout if nargout is
Definition: load-save.cc:1576
octave_value op_ge(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1525
bool is_uint32_type(void) const
Definition: ov.h:653
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
octave_uint32 uint32_scalar_value(void) const
Definition: ov.h:878
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
Definition: ov.h:1284
unary_op
Definition: ov.h:76
uint32NDArray uint32_array_value(void) const
Definition: ov.h:902
octave_value op_uminus(const octave_value &a)
Definition: ov.h:1486
set(hf,"paperorientation") esult
Definition: graphics.cc:10111
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition: utils.cc:854
builtin_type_t builtin_type(void) const
Definition: ov.h:619
octave_value as_uint64(void) const
Definition: ov.h:402
dim_vector dv
Definition: sub2ind.cc:263
OCTINTERP_API octave_value do_colon_op(const octave_value &base, const octave_value &limit, bool is_for_cmd_expr=false)
Definition: ov.h:1258
bool is_diag_matrix(void) const
Definition: ov.h:572
uint16NDArray uint16_array_value(void) const
Definition: ov.h:899
octave_value op_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1516
bool is_zero_by_zero(void) const
Definition: ov.h:696
void convert_to_row_or_column_vector(void)
Definition: ov.h:1210
double log2(double x)
Definition: lo-mappers.cc:233
octave_uint16 uint16_scalar_value(void) const
Definition: ov.h:875
octave_value op_gt(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1526
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE * x
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
static int xisascii(int c)
Definition: ov-ch-mat.cc:241
bool is_real_matrix(void) const
Definition: ov.h:554
size_t byte_size(void) const
Definition: ov.h:506
short int short_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:739
octave_lvalue & operator=(const octave_lvalue &vr)
Definition: oct-lvalue.h:51
bool is_integer_type(void) const
Definition: ov.h:664
std::complex< double > erfc(std::complex< double > z, double relerr=0)
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
Definition: ov.h:454