GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
ov.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1996-2021 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_ov_h)
27 #define octave_ov_h 1
28 
29 #include "octave-config.h"
30 
31 #include <cstdlib>
32 
33 #include <iosfwd>
34 #include <string>
35 #include <list>
36 #include <map>
37 
38 #include "Range.h"
39 #include "data-conv.h"
40 #include "idx-vector.h"
41 #include "mach-info.h"
42 #include "mx-base.h"
43 #include "oct-sort.h"
44 #include "oct-time.h"
45 #include "str-vec.h"
46 
47 namespace octave
48 {
49  class type_info;
50 }
51 
52 class Cell;
53 class float_format;
54 class mxArray;
55 class octave_map;
56 class octave_scalar_map;
57 class octave_function;
59 class octave_fcn_handle;
60 class octave_value_list;
61 
62 #include "oct-stream.h"
63 #include "ov-base.h"
64 
65 // Forward declarations of friend functions that have default arguments.
66 
67 OCTINTERP_API octave_value do_colon_op (const octave_value& base,
68  const octave_value& limit,
69  bool is_for_cmd_expr = false);
70 
71 OCTINTERP_API octave_value do_colon_op (const octave_value& base,
72  const octave_value& increment,
73  const octave_value& limit,
74  bool is_for_cmd_expr = false);
75 
76 class
77 OCTINTERP_API
79 {
80 public:
81 
82  enum unary_op
83  {
84  op_not, // not
85  op_uplus, // uplus
86  op_uminus, // uminus
87  op_transpose, // transpose
88  op_hermitian, // ctranspose
92  unknown_unary_op
93  };
94 
95  enum binary_op
96  {
97  op_add, // plus
98  op_sub, // minus
99  op_mul, // mtimes
100  op_div, // mrdivide
101  op_pow, // mpower
102  op_ldiv, // mldivide
103  op_lt, // lt
104  op_le, // le
105  op_eq, // eq
106  op_ge, // ge
107  op_gt, // gt
108  op_ne, // ne
109  op_el_mul, // times
110  op_el_div, // rdivide
111  op_el_pow, // power
112  op_el_ldiv, // ldivide
113  op_el_and, // and
114  op_el_or, // or
117  unknown_binary_op
118  };
119 
121  {
122  // ** compound operations **
134  unknown_compound_binary_op
135  };
136 
138  {
153  unknown_assign_op
154  };
155 
156  static binary_op assign_op_to_binary_op (assign_op);
157 
158  static assign_op binary_op_to_assign_op (binary_op);
159 
160  static std::string unary_op_as_string (unary_op);
161  static std::string unary_op_fcn_name (unary_op);
162 
163  static std::string binary_op_as_string (binary_op);
164  static std::string binary_op_fcn_name (binary_op);
165 
166  static std::string binary_op_fcn_name (compound_binary_op);
167 
168  static std::string assign_op_as_string (assign_op);
169 
170  static octave_value empty_conv (const std::string& type,
171  const octave_value& rhs = octave_value ());
172 
173  enum magic_colon { magic_colon_t };
174 
176  : rep (nil_rep ())
177  {
178  rep->count++;
179  }
180 
181  octave_value (short int i);
182  octave_value (unsigned short int i);
183  octave_value (int i);
184  octave_value (unsigned int i);
185  octave_value (long int i);
186  octave_value (unsigned long int i);
187 
188  // FIXME: These are kluges. They turn into doubles internally, which will
189  // break for very large values. We just use them to store things like
190  // 64-bit ino_t, etc, and hope that those values are never actually larger
191  // than can be represented exactly in a double.
192 
193 #if defined (OCTAVE_HAVE_LONG_LONG_INT)
194  octave_value (long long int i);
195 #endif
196 #if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT)
197  octave_value (unsigned long long int i);
198 #endif
199 
201  octave_value (double d);
202  octave_value (float d);
203  octave_value (const Array<octave_value>& a, bool is_cs_list = false);
204  octave_value (const Cell& c, bool is_cs_list = false);
205  octave_value (const Matrix& m, const MatrixType& t = MatrixType ());
206  octave_value (const FloatMatrix& m, const MatrixType& t = MatrixType ());
207  octave_value (const NDArray& nda);
208  octave_value (const FloatNDArray& nda);
209  octave_value (const Array<double>& m);
210  octave_value (const Array<float>& m);
211  octave_value (const DiagMatrix& d);
216  octave_value (const FloatDiagMatrix& d);
217  octave_value (const RowVector& v);
218  octave_value (const FloatRowVector& v);
219  octave_value (const ColumnVector& v);
220  octave_value (const FloatColumnVector& v);
221  octave_value (const Complex& C);
222  octave_value (const FloatComplex& C);
223  octave_value (const ComplexMatrix& m, const MatrixType& t = MatrixType ());
225  const MatrixType& t = MatrixType ());
226  octave_value (const ComplexNDArray& cnda);
227  octave_value (const FloatComplexNDArray& cnda);
228  octave_value (const Array<Complex>& m);
232  octave_value (const ComplexRowVector& v);
236  octave_value (const PermMatrix& p);
237  octave_value (bool b);
238  octave_value (const boolMatrix& bm, const MatrixType& t = MatrixType ());
239  octave_value (const boolNDArray& bnda);
240  octave_value (const Array<bool>& bnda);
241  octave_value (char c, char type = '\'');
242  octave_value (const char *s, char type = '\'');
243  octave_value (const std::string& s, char type = '\'');
244  octave_value (const string_vector& s, char type = '\'');
245  octave_value (const charMatrix& chm, char type = '\'');
246  octave_value (const charNDArray& chnda, char type = '\'');
247  octave_value (const Array<char>& chnda, char type = '\'');
248 
252  const MatrixType& t = MatrixType ());
255  const MatrixType& t = MatrixType ());
265  octave_value (const int8NDArray& inda);
267  octave_value (const int16NDArray& inda);
269  octave_value (const int32NDArray& inda);
271  octave_value (const int64NDArray& inda);
273  octave_value (const uint8NDArray& inda);
282  bool zero_based = false, bool cache_index = false);
284  octave_value (const idx_vector& idx, bool lazy = true);
285  octave_value (double base, double limit, double inc);
286  octave_value (const Range& r, bool force_range = false);
289  octave_value (const std::map<std::string, octave_value>&);
290  octave_value (const octave_map& m, const std::string& id,
291  const std::list<std::string>& plist);
292  octave_value (const octave_scalar_map& m, const std::string& id,
293  const std::list<std::string>& plist);
294 
295  // This one is explicit because it can cause some trouble to
296  // accidentally create a cs-list when one was not intended.
297  explicit octave_value (const octave_value_list& m);
298 
300 
301  octave_value (octave_base_value *new_rep, bool borrow = false);
302 
303  // Copy constructor.
304 
306  : rep (a.rep)
307  {
308  rep->count++;
309  }
310 
312  : rep (a.rep)
313  {
314  a.rep = nullptr;
315  }
316 
317  // This should only be called for derived types.
318 
319  octave_base_value * clone (void) const;
320 
322  { return rep->empty_clone (); }
323 
324  // Delete the representation of this constant if the count drops to zero.
325 
327  {
328  // Because we define a move constructor and a move assignment
329  // operator, rep may be a nullptr here. We should only need to
330  // protect the move assignment operator in a similar way.
331 
332  if (rep && --rep->count == 0 && rep != nil_rep ())
333  delete rep;
334  }
335 
336  void make_unique (void)
337  {
338  if (rep->count > 1)
339  {
340  octave_base_value *r = rep->unique_clone ();
341 
342  if (--rep->count == 0 && rep != nil_rep ())
343  delete rep;
344 
345  rep = r;
346  }
347  }
348 
349  // This uniquifies the value if it is referenced by more than a certain
350  // number of shallow copies. This is useful for optimizations where we
351  // know a certain copy, typically within a cell array, to be obsolete.
352  void make_unique (int obsolete_copies)
353  {
354  if (rep->count > obsolete_copies + 1)
355  {
356  octave_base_value *r = rep->unique_clone ();
357 
358  if (--rep->count == 0 && rep != nil_rep ())
359  delete rep;
360 
361  rep = r;
362  }
363  }
364 
365  // Simple assignment.
366 
368  {
369  if (rep != a.rep)
370  {
371  if (--rep->count == 0 && rep != nil_rep ())
372  delete rep;
373 
374  rep = a.rep;
375  rep->count++;
376  }
377 
378  return *this;
379  }
380 
382  {
383  // Because we define a move constructor and a move assignment
384  // operator, rep may be a nullptr here. We should only need to
385  // protect the destructor in a similar way.
386 
387  if (this != &a)
388  {
389  if (rep && --rep->count == 0 && rep != nil_rep ())
390  delete rep;
391 
392  rep = a.rep;
393  a.rep = nullptr;
394  }
395 
396  return *this;
397  }
398 
399  octave_idx_type get_count (void) const { return rep->count; }
400 
402  { return rep->numeric_conversion_function (); }
403 
405  { return rep->numeric_demotion_function (); }
406 
407  void maybe_mutate (void);
408 
409  octave_value squeeze (void) const
410  { return rep->squeeze (); }
411 
412  // The result of full().
414  { return rep->full_value (); }
415 
416  // Type conversions.
417 
418  octave_value as_double (void) const { return rep->as_double (); }
419  octave_value as_single (void) const { return rep->as_single (); }
420 
421  octave_value as_int8 (void) const { return rep->as_int8 (); }
422  octave_value as_int16 (void) const { return rep->as_int16 (); }
423  octave_value as_int32 (void) const { return rep->as_int32 (); }
424  octave_value as_int64 (void) const { return rep->as_int64 (); }
425 
426  octave_value as_uint8 (void) const { return rep->as_uint8 (); }
427  octave_value as_uint16 (void) const { return rep->as_uint16 (); }
428  octave_value as_uint32 (void) const { return rep->as_uint32 (); }
429  octave_value as_uint64 (void) const { return rep->as_uint64 (); }
430 
432  { return rep->try_narrowing_conversion (); }
433 
434  // Close to dims (), but can be overloaded for classes.
435  Matrix size (void)
436  { return rep->size (); }
437 
438  // FIXME: should this function be deprecated and removed? It supports
439  // an undocumented feature of Matlab.
441  { return rep->xnumel (idx); }
442 
443  // FIXME: Do we really need all these different versions of subsref
444  // and related functions?
445 
446  octave_value single_subsref (const std::string& type,
447  const octave_value_list& idx);
448 
449  octave_value subsref (const std::string& type,
450  const std::list<octave_value_list>& idx)
451  { return rep->subsref (type, idx); }
452 
453  octave_value subsref (const std::string& type,
454  const std::list<octave_value_list>& idx,
455  bool auto_add)
456  { return rep->subsref (type, idx, auto_add); }
457 
458  octave_value_list subsref (const std::string& type,
459  const std::list<octave_value_list>& idx,
460  int nargout);
461 
462  octave_value next_subsref (const std::string& type, const
463  std::list<octave_value_list>& idx,
464  size_t skip = 1);
465 
467  const std::string& type, const
468  std::list<octave_value_list>& idx,
469  size_t skip = 1);
470 
471  octave_value next_subsref (bool auto_add, const std::string& type, const
472  std::list<octave_value_list>& idx,
473  size_t skip = 1);
474 
476  bool resize_ok = false)
477  { return rep->do_index_op (idx, resize_ok); }
478 
479  octave_value subsasgn (const std::string& type,
480  const std::list<octave_value_list>& idx,
481  const octave_value& rhs);
482 
483  octave_value undef_subsasgn (const std::string& type,
484  const std::list<octave_value_list>& idx,
485  const octave_value& rhs);
486 
487  octave_value& assign (assign_op op, const std::string& type,
488  const std::list<octave_value_list>& idx,
489  const octave_value& rhs);
490 
492 
493  idx_vector index_vector (bool require_integers = false) const
494  {
495  return rep->index_vector (require_integers);
496  }
497 
498  // Size.
499 
500  dim_vector dims (void) const { return rep->dims (); }
501 
502  std::string get_dims_str (void) const;
503 
504  octave_idx_type rows (void) const { return rep->rows (); }
505 
506  octave_idx_type columns (void) const { return rep->columns (); }
507 
508  octave_idx_type length (void) const;
509 
510  int ndims (void) const { return rep->ndims (); }
511 
512  bool all_zero_dims (void) const { return dims ().all_zero (); }
513 
514  // Are the dimensions of this constant zero by zero?
515  bool is_zero_by_zero (void) const
516  { return (ndims () == 2 && rows () == 0 && columns () == 0); }
517 
518  octave_idx_type numel (void) const
519  { return rep->numel (); }
520 
521  size_t byte_size (void) const
522  { return rep->byte_size (); }
523 
524  octave_idx_type nnz (void) const { return rep->nnz (); }
525 
526  octave_idx_type nzmax (void) const { return rep->nzmax (); }
527 
528  octave_idx_type nfields (void) const { return rep->nfields (); }
529 
530  octave_value reshape (const dim_vector& dv) const
531  { return rep->reshape (dv); }
532 
533  octave_value permute (const Array<int>& vec, bool inv = false) const
534  { return rep->permute (vec, inv); }
535 
536  octave_value ipermute (const Array<int>& vec) const
537  { return rep->permute (vec, true); }
538 
539  octave_value resize (const dim_vector& dv, bool fill = false) const
540  { return rep->resize (dv, fill);}
541 
542  MatrixType matrix_type (void) const
543  { return rep->matrix_type (); }
544 
545  MatrixType matrix_type (const MatrixType& typ) const
546  { return rep->matrix_type (typ); }
547 
548  // Does this constant have a type? Both of these are provided since it is
549  // sometimes more natural to write is_undefined() instead of ! is_defined().
550 
551  bool is_defined (void) const
552  { return rep->is_defined (); }
553 
554  bool is_undefined (void) const
555  { return ! is_defined (); }
556 
557  bool isempty (void) const
558  { return rep->isempty (); }
559 
560  bool iscell (void) const
561  { return rep->iscell (); }
562 
563  bool iscellstr (void) const
564  { return rep->iscellstr (); }
565 
566  bool is_real_scalar (void) const
567  { return rep->is_real_scalar (); }
568 
569  bool is_real_matrix (void) const
570  { return rep->is_real_matrix (); }
571 
572  bool is_complex_scalar (void) const
573  { return rep->is_complex_scalar (); }
574 
575  bool is_complex_matrix (void) const
576  { return rep->is_complex_matrix (); }
577 
578  bool is_bool_scalar (void) const
579  { return rep->is_bool_scalar (); }
580 
581  bool is_bool_matrix (void) const
582  { return rep->is_bool_matrix (); }
583 
584  bool is_char_matrix (void) const
585  { return rep->is_char_matrix (); }
586 
587  bool is_diag_matrix (void) const
588  { return rep->is_diag_matrix (); }
589 
590  bool is_perm_matrix (void) const
591  { return rep->is_perm_matrix (); }
592 
593  bool is_string (void) const
594  { return rep->is_string (); }
595 
596  bool is_sq_string (void) const
597  { return rep->is_sq_string (); }
598 
599  bool is_dq_string (void) const
600  { return rep->is_string () && ! rep->is_sq_string (); }
601 
602  bool is_range (void) const
603  { return rep->is_range (); }
604 
605  bool isstruct (void) const
606  { return rep->isstruct (); }
607 
608  bool is_classdef_meta (void) const
609  { return rep->is_classdef_meta (); }
610 
611  bool is_classdef_object (void) const
612  { return rep->is_classdef_object (); }
613 
614  bool is_classdef_superclass_ref (void) const
615  { return rep->is_classdef_superclass_ref (); }
616 
617  bool is_package (void) const
618  { return rep->is_package (); }
619 
620  bool isobject (void) const
621  { return rep->isobject (); }
622 
623  bool isjava (void) const
624  { return rep->isjava (); }
625 
626  bool is_cs_list (void) const
627  { return rep->is_cs_list (); }
628 
629  bool is_magic_colon (void) const
630  { return rep->is_magic_colon (); }
631 
632  bool isnull (void) const
633  { return rep->isnull (); }
634 
635  // Are any or all of the elements in this constant nonzero?
636 
637  octave_value all (int dim = 0) const
638  { return rep->all (dim); }
639 
640  octave_value any (int dim = 0) const
641  { return rep->any (dim); }
642 
644  { return rep->builtin_type (); }
645 
646  // Floating point types.
647 
648  bool is_double_type (void) const
649  { return rep->is_double_type (); }
650 
651  bool is_single_type (void) const
652  { return rep->is_single_type (); }
653 
654  bool isfloat (void) const
655  { return rep->isfloat (); }
656 
657  // Integer types.
658 
659  bool is_int8_type (void) const
660  { return rep->is_int8_type (); }
661 
662  bool is_int16_type (void) const
663  { return rep->is_int16_type (); }
664 
665  bool is_int32_type (void) const
666  { return rep->is_int32_type (); }
667 
668  bool is_int64_type (void) const
669  { return rep->is_int64_type (); }
670 
671  bool is_uint8_type (void) const
672  { return rep->is_uint8_type (); }
673 
674  bool is_uint16_type (void) const
675  { return rep->is_uint16_type (); }
676 
677  bool is_uint32_type (void) const
678  { return rep->is_uint32_type (); }
679 
680  bool is_uint64_type (void) const
681  { return rep->is_uint64_type (); }
682 
683  bool isinteger (void) const
684  { return rep->isinteger (); }
685 
686  // Other type stuff.
687 
688  bool islogical (void) const
689  { return rep->islogical (); }
690 
691  bool isreal (void) const
692  { return rep->isreal (); }
693 
694  bool iscomplex (void) const
695  { return rep->iscomplex (); }
696 
697  bool is_scalar_type (void) const
698  { return rep->is_scalar_type (); }
699 
700  bool is_matrix_type (void) const
701  { return rep->is_matrix_type (); }
702 
703  bool isnumeric (void) const
704  { return rep->isnumeric (); }
705 
706  bool issparse (void) const
707  { return rep->issparse (); }
708 
709  // Does this constant correspond to a truth value?
710 
711  bool is_true (void) const
712  { return rep->is_true (); }
713 
714  // Do two constants match (in a switch statement)?
715 
716  bool is_equal (const octave_value&) const;
717 
718  bool is_constant (void) const
719  { return rep->is_constant (); }
720 
721  bool is_function_handle (void) const
722  { return rep->is_function_handle (); }
723 
724  bool is_anonymous_function (void) const
725  { return rep->is_anonymous_function (); }
726 
727  bool is_inline_function (void) const
728  { return rep->is_inline_function (); }
729 
730  bool is_function (void) const
731  { return rep->is_function (); }
732 
733  bool is_user_script (void) const
734  { return rep->is_user_script (); }
735 
736  bool is_user_function (void) const
737  { return rep->is_user_function (); }
738 
739  bool is_user_code (void) const
740  { return rep->is_user_code (); }
741 
742  bool is_builtin_function (void) const
743  { return rep->is_builtin_function (); }
744 
745  bool is_dld_function (void) const
746  { return rep->is_dld_function (); }
747 
748  bool is_mex_function (void) const
749  { return rep->is_mex_function (); }
750 
751  void erase_subfunctions (void) { rep->erase_subfunctions (); }
752 
753  // Values.
754 
755  octave_value eval (void) { return *this; }
756 
757  short int
758  short_value (bool req_int = false, bool frc_str_conv = false) const
759  { return rep->short_value (req_int, frc_str_conv); }
760 
761  unsigned short int
762  ushort_value (bool req_int = false, bool frc_str_conv = false) const
763  { return rep->ushort_value (req_int, frc_str_conv); }
764 
765  int int_value (bool req_int = false, bool frc_str_conv = false) const
766  { return rep->int_value (req_int, frc_str_conv); }
767 
768  unsigned int
769  uint_value (bool req_int = false, bool frc_str_conv = false) const
770  { return rep->uint_value (req_int, frc_str_conv); }
771 
772  int nint_value (bool frc_str_conv = false) const
773  { return rep->nint_value (frc_str_conv); }
774 
775  long int
776  long_value (bool req_int = false, bool frc_str_conv = false) const
777  { return rep->long_value (req_int, frc_str_conv); }
778 
779  unsigned long int
780  ulong_value (bool req_int = false, bool frc_str_conv = false) const
781  { return rep->ulong_value (req_int, frc_str_conv); }
782 
783  int64_t
784  int64_value (bool req_int = false, bool frc_str_conv = false) const
785  { return rep->int64_value (req_int, frc_str_conv); }
786 
787  uint64_t
788  uint64_value (bool req_int = false, bool frc_str_conv = false) const
789  { return rep->uint64_value (req_int, frc_str_conv); }
790 
792  idx_type_value (bool req_int = false, bool frc_str_conv = false) const;
793 
794  double double_value (bool frc_str_conv = false) const
795  { return rep->double_value (frc_str_conv); }
796 
797  float float_value (bool frc_str_conv = false) const
798  { return rep->float_value (frc_str_conv); }
799 
800  double scalar_value (bool frc_str_conv = false) const
801  { return rep->scalar_value (frc_str_conv); }
802 
803  float float_scalar_value (bool frc_str_conv = false) const
804  { return rep->float_scalar_value (frc_str_conv); }
805 
806  Matrix matrix_value (bool frc_str_conv = false) const
807  { return rep->matrix_value (frc_str_conv); }
808 
809  FloatMatrix float_matrix_value (bool frc_str_conv = false) const
810  { return rep->float_matrix_value (frc_str_conv); }
811 
812  NDArray array_value (bool frc_str_conv = false) const
813  { return rep->array_value (frc_str_conv); }
814 
815  FloatNDArray float_array_value (bool frc_str_conv = false) const
816  { return rep->float_array_value (frc_str_conv); }
817 
818  Complex complex_value (bool frc_str_conv = false) const
819  { return rep->complex_value (frc_str_conv); }
820 
821  FloatComplex float_complex_value (bool frc_str_conv = false) const
822  { return rep->float_complex_value (frc_str_conv); }
823 
824  ComplexMatrix complex_matrix_value (bool frc_str_conv = false) const
825  { return rep->complex_matrix_value (frc_str_conv); }
826 
828  float_complex_matrix_value (bool frc_str_conv = false) const
829  { return rep->float_complex_matrix_value (frc_str_conv); }
830 
831  ComplexNDArray complex_array_value (bool frc_str_conv = false) const
832  { return rep->complex_array_value (frc_str_conv); }
833 
835  float_complex_array_value (bool frc_str_conv = false) const
836  { return rep->float_complex_array_value (frc_str_conv); }
837 
838  bool bool_value (bool warn = false) const
839  { return rep->bool_value (warn); }
840 
841  boolMatrix bool_matrix_value (bool warn = false) const
842  { return rep->bool_matrix_value (warn); }
843 
844  boolNDArray bool_array_value (bool warn = false) const
845  { return rep->bool_array_value (warn); }
846 
847  charMatrix char_matrix_value (bool frc_str_conv = false) const
848  { return rep->char_matrix_value (frc_str_conv); }
849 
850  charNDArray char_array_value (bool frc_str_conv = false) const
851  { return rep->char_array_value (frc_str_conv); }
852 
853  SparseMatrix sparse_matrix_value (bool frc_str_conv = false) const
854  { return rep->sparse_matrix_value (frc_str_conv); }
855 
857  sparse_complex_matrix_value (bool frc_str_conv = false) const
858  { return rep->sparse_complex_matrix_value (frc_str_conv); }
859 
860  SparseBoolMatrix sparse_bool_matrix_value (bool warn = false) const
861  { return rep->sparse_bool_matrix_value (warn); }
862 
863  DiagMatrix diag_matrix_value (bool force = false) const
864  { return rep->diag_matrix_value (force); }
865 
866  FloatDiagMatrix float_diag_matrix_value (bool force = false) const
867  { return rep->float_diag_matrix_value (force); }
868 
869  ComplexDiagMatrix complex_diag_matrix_value (bool force = false) const
870  { return rep->complex_diag_matrix_value (force); }
871 
873  float_complex_diag_matrix_value (bool force = false) const
874  { return rep->float_complex_diag_matrix_value (force); }
875 
877  { return rep->perm_matrix_value (); }
878 
880  { return rep->int8_scalar_value (); }
881 
883  { return rep->int16_scalar_value (); }
884 
886  { return rep->int32_scalar_value (); }
887 
889  { return rep->int64_scalar_value (); }
890 
892  { return rep->uint8_scalar_value (); }
893 
895  { return rep->uint16_scalar_value (); }
896 
898  { return rep->uint32_scalar_value (); }
899 
901  { return rep->uint64_scalar_value (); }
902 
904  { return rep->int8_array_value (); }
905 
907  { return rep->int16_array_value (); }
908 
910  { return rep->int32_array_value (); }
911 
913  { return rep->int64_array_value (); }
914 
916  { return rep->uint8_array_value (); }
917 
919  { return rep->uint16_array_value (); }
920 
922  { return rep->uint32_array_value (); }
923 
925  { return rep->uint64_array_value (); }
926 
927  std::string string_value (bool force = false) const
928  { return rep->string_value (force); }
929 
930  string_vector string_vector_value (bool pad = false) const
931  { return rep->string_vector_value (pad); }
932 
933  Cell cell_value (void) const;
934 
936  { return rep->cellstr_value (); }
937 
938  Range range_value (void) const
939  { return rep->range_value (); }
940 
941  octave_map map_value (void) const;
942 
944 
945  string_vector map_keys (void) const
946  { return rep->map_keys (); }
947 
948  size_t nparents (void) const
949  { return rep->nparents (); }
950 
951  std::list<std::string> parent_class_name_list (void) const
952  { return rep->parent_class_name_list (); }
953 
955  { return rep->parent_class_names (); }
956 
958  find_parent_class (const std::string& parent_class_name)
959  { return rep->find_parent_class (parent_class_name); }
960 
961  bool is_instance_of (const std::string& cls_name) const
962  { return rep->is_instance_of (cls_name); }
963 
964  octave_classdef * classdef_object_value (bool silent = false) const;
965 
966  octave_function * function_value (bool silent = false) const;
967 
968  octave_user_function * user_function_value (bool silent = false) const;
969 
970  octave_user_script * user_script_value (bool silent = false) const;
971 
972  octave_user_code * user_code_value (bool silent = false) const;
973 
974  octave_fcn_handle * fcn_handle_value (bool silent = false) const;
975 
977 
978  ColumnVector column_vector_value (bool frc_str_conv = false,
979  bool frc_vec_conv = false) const;
980 
982  complex_column_vector_value (bool frc_str_conv = false,
983  bool frc_vec_conv = false) const;
984 
985  RowVector row_vector_value (bool frc_str_conv = false,
986  bool frc_vec_conv = false) const;
987 
989  complex_row_vector_value (bool frc_str_conv = false,
990  bool frc_vec_conv = false) const;
991 
992  FloatColumnVector float_column_vector_value (bool frc_str_conv = false,
993  bool frc_vec_conv = false) const;
994 
996  float_complex_column_vector_value (bool frc_str_conv = false,
997  bool frc_vec_conv = false) const;
998 
999  FloatRowVector float_row_vector_value (bool frc_str_conv = false,
1000  bool frc_vec_conv = false) const;
1001 
1003  float_complex_row_vector_value (bool frc_str_conv = false,
1004  bool frc_vec_conv = false) const;
1005 
1006  Array<int> int_vector_value (bool req_int = false,
1007  bool frc_str_conv = false,
1008  bool frc_vec_conv = false) const;
1009 
1011  octave_idx_type_vector_value (bool req_int = false,
1012  bool frc_str_conv = false,
1013  bool frc_vec_conv = false) const;
1014 
1015  Array<double> vector_value (bool frc_str_conv = false,
1016  bool frc_vec_conv = false) const;
1017 
1018  Array<Complex> complex_vector_value (bool frc_str_conv = false,
1019  bool frc_vec_conv = false) const;
1020 
1021  Array<float> float_vector_value (bool frc_str_conv = false,
1022  bool frc_vec_conv = false) const;
1023 
1025  float_complex_vector_value (bool frc_str_conv = false,
1026  bool frc_vec_conv = false) const;
1027 
1028  // Extract values of specific types without any implicit type conversions.
1029  // Throw an error if an object is the wrong type for the requested value
1030  // extraction.
1031  //
1032  // These functions are intended to provide a simple way to extract values of
1033  // specific types and display error messages that are more meaningful than
1034  // the generic "error: wrong type argument 'cell'" message.
1035 
1036  short int xshort_value (const char *fmt, ...) const;
1037 
1038  unsigned short int xushort_value (const char *fmt, ...) const;
1039 
1040  int xint_value (const char *fmt, ...) const;
1041 
1042  unsigned int xuint_value (const char *fmt, ...) const;
1043 
1044  int xnint_value (const char *fmt, ...) const;
1045 
1046  long int xlong_value (const char *fmt, ...) const;
1047 
1048  unsigned long int xulong_value (const char *fmt, ...) const;
1049 
1050  int64_t xint64_value (const char *fmt, ...) const;
1051 
1052  uint64_t xuint64_value (const char *fmt, ...) const;
1053 
1054  octave_idx_type xidx_type_value (const char *fmt, ...) const;
1055 
1056  double xdouble_value (const char *fmt, ...) const;
1057 
1058  float xfloat_value (const char *fmt, ...) const;
1059 
1060  double xscalar_value (const char *fmt, ...) const;
1061 
1062  float xfloat_scalar_value (const char *fmt, ...) const;
1063 
1064  Matrix xmatrix_value (const char *fmt, ...) const;
1065 
1066  FloatMatrix xfloat_matrix_value (const char *fmt, ...) const;
1067 
1068  NDArray xarray_value (const char *fmt, ...) const;
1069 
1070  FloatNDArray xfloat_array_value (const char *fmt, ...) const;
1071 
1072  Complex xcomplex_value (const char *fmt, ...) const;
1073 
1074  FloatComplex xfloat_complex_value (const char *fmt, ...) const;
1075 
1076  ComplexMatrix xcomplex_matrix_value (const char *fmt, ...) const;
1077 
1078  FloatComplexMatrix xfloat_complex_matrix_value (const char *fmt, ...) const;
1079 
1080  ComplexNDArray xcomplex_array_value (const char *fmt, ...) const;
1081 
1082  FloatComplexNDArray xfloat_complex_array_value (const char *fmt, ...) const;
1083 
1084  bool xbool_value (const char *fmt, ...) const;
1085 
1086  boolMatrix xbool_matrix_value (const char *fmt, ...) const;
1087 
1088  boolNDArray xbool_array_value (const char *fmt, ...) const;
1089 
1090  charMatrix xchar_matrix_value (const char *fmt, ...) const;
1091 
1092  charNDArray xchar_array_value (const char *fmt, ...) const;
1093 
1094  SparseMatrix xsparse_matrix_value (const char *fmt, ...) const;
1095 
1097 
1098  SparseBoolMatrix xsparse_bool_matrix_value (const char *fmt, ...) const;
1099 
1100  DiagMatrix xdiag_matrix_value (const char *fmt, ...) const;
1101 
1102  FloatDiagMatrix xfloat_diag_matrix_value (const char *fmt, ...) const;
1103 
1104  ComplexDiagMatrix xcomplex_diag_matrix_value (const char *fmt, ...) const;
1105 
1107 
1108  PermMatrix xperm_matrix_value (const char *fmt, ...) const;
1109 
1110  octave_int8 xint8_scalar_value (const char *fmt, ...) const;
1111 
1112  octave_int16 xint16_scalar_value (const char *fmt, ...) const;
1113 
1114  octave_int32 xint32_scalar_value (const char *fmt, ...) const;
1115 
1116  octave_int64 xint64_scalar_value (const char *fmt, ...) const;
1117 
1118  octave_uint8 xuint8_scalar_value (const char *fmt, ...) const;
1119 
1120  octave_uint16 xuint16_scalar_value (const char *fmt, ...) const;
1121 
1122  octave_uint32 xuint32_scalar_value (const char *fmt, ...) const;
1123 
1124  octave_uint64 xuint64_scalar_value (const char *fmt, ...) const;
1125 
1126  int8NDArray xint8_array_value (const char *fmt, ...) const;
1127 
1128  int16NDArray xint16_array_value (const char *fmt, ...) const;
1129 
1130  int32NDArray xint32_array_value (const char *fmt, ...) const;
1131 
1132  int64NDArray xint64_array_value (const char *fmt, ...) const;
1133 
1134  uint8NDArray xuint8_array_value (const char *fmt, ...) const;
1135 
1136  uint16NDArray xuint16_array_value (const char *fmt, ...) const;
1137 
1138  uint32NDArray xuint32_array_value (const char *fmt, ...) const;
1139 
1140  uint64NDArray xuint64_array_value (const char *fmt, ...) const;
1141 
1142  std::string xstring_value (const char *fmt, ...) const;
1143 
1144  string_vector xstring_vector_value (const char *fmt, ...) const;
1145 
1146  Cell xcell_value (const char *fmt, ...) const;
1147 
1148  Array<std::string> xcellstr_value (const char *fmt, ...) const;
1149 
1150  Range xrange_value (const char *fmt, ...) const;
1151 
1152  octave_map xmap_value (const char *fmt, ...) const;
1153 
1154  octave_scalar_map xscalar_map_value (const char *fmt, ...) const;
1155 
1156  ColumnVector xcolumn_vector_value (const char *fmt, ...) const;
1157 
1159  xcomplex_column_vector_value (const char *fmt, ...) const;
1160 
1161  RowVector xrow_vector_value (const char *fmt, ...) const;
1162 
1163  ComplexRowVector xcomplex_row_vector_value (const char *fmt, ...) const;
1164 
1165  FloatColumnVector xfloat_column_vector_value (const char *fmt, ...) const;
1166 
1168  xfloat_complex_column_vector_value (const char *fmt, ...) const;
1169 
1170  FloatRowVector xfloat_row_vector_value (const char *fmt, ...) const;
1171 
1173  xfloat_complex_row_vector_value (const char *fmt, ...) const;
1174 
1175  Array<int> xint_vector_value (const char *fmt, ...) const;
1176 
1178  xoctave_idx_type_vector_value (const char *fmt, ...) const;
1179 
1180  Array<double> xvector_value (const char *fmt, ...) const;
1181 
1182  Array<Complex> xcomplex_vector_value (const char *fmt, ...) const;
1183 
1184  Array<float> xfloat_vector_value (const char *fmt, ...) const;
1185 
1186  Array<FloatComplex> xfloat_complex_vector_value (const char *fmt, ...) const;
1187 
1188  octave_function * xfunction_value (const char *fmt, ...) const;
1189  octave_user_function * xuser_function_value (const char *fmt, ...) const;
1190  octave_user_script * xuser_script_value (const char *fmt, ...) const;
1191  octave_user_code * xuser_code_value (const char *fmt, ...) const;
1192  octave_fcn_handle * xfcn_handle_value (const char *fmt, ...) const;
1193 
1194  octave_value_list xlist_value (const char *fmt, ...) const;
1195 
1196  // Possibly economize a lazy-indexed value.
1197 
1198  void maybe_economize (void)
1199  { rep->maybe_economize (); }
1200 
1201  // The following two hook conversions are called on any octave_value prior to
1202  // storing it to a "permanent" location, like a named variable, a cell or a
1203  // struct component, or a return value of a function.
1204 
1206 
1207  // Ditto, but in place, i.e., equivalent to *this = this->storable_value (),
1208  // but possibly more efficient.
1209 
1210  void make_storable_value (void);
1211 
1212  // FIXME: These should probably be private.
1213  // Conversions. If a user of this class wants a certain kind of constant,
1214  // he should simply ask for it, and we should convert it if possible.
1215 
1216  octave_value convert_to_str (bool pad = false, bool force = false,
1217  char type = '\'') const
1218  { return rep->convert_to_str (pad, force, type); }
1219 
1220  octave_value
1221  convert_to_str_internal (bool pad, bool force, char type) const
1222  { return rep->convert_to_str_internal (pad, force, type); }
1223 
1225  { rep->convert_to_row_or_column_vector (); }
1226 
1227  bool print_as_scalar (void) const
1228  { return rep->print_as_scalar (); }
1229 
1230  void print (std::ostream& os, bool pr_as_read_syntax = false)
1231  { rep->print (os, pr_as_read_syntax); }
1232 
1233  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const
1234  { rep->print_raw (os, pr_as_read_syntax); }
1235 
1236  bool print_name_tag (std::ostream& os, const std::string& name) const
1237  { return rep->print_name_tag (os, name); }
1238 
1239  void print_with_name (std::ostream& os, const std::string& name) const
1240  { rep->print_with_name (os, name, true); }
1241 
1242  void short_disp (std::ostream& os) const { rep->short_disp (os); }
1243 
1245 
1246  std::string edit_display (const float_display_format& fmt,
1247  octave_idx_type i, octave_idx_type j) const
1248  {
1249  return rep->edit_display (fmt, i, j);
1250  }
1251 
1252  int type_id (void) const { return rep->type_id (); }
1253 
1254  std::string type_name (void) const { return rep->type_name (); }
1255 
1256  std::string class_name (void) const { return rep->class_name (); }
1257 
1258  // Unary and binary operations.
1259 
1260  friend OCTINTERP_API octave_value
1261  do_unary_op (octave::type_info& ti, unary_op op, const octave_value& a);
1262 
1263  octave_value& do_non_const_unary_op (unary_op op);
1264 
1265  octave_value& do_non_const_unary_op (unary_op op, const std::string& type,
1266  const std::list<octave_value_list>& idx);
1267 
1268  friend OCTINTERP_API octave_value
1270  const octave_value& a, const octave_value& b);
1271 
1272  friend OCTINTERP_API octave_value
1274  const octave_value& a, const octave_value& b);
1275 
1276  friend OCTINTERP_API octave_value
1278  const octave_value& b, const Array<octave_idx_type>& ra_idx);
1279 
1280  friend OCTINTERP_API octave_value do_colon_op (const octave_value& base,
1281  const octave_value& limit,
1282  bool is_for_cmd_expr)
1283  {
1284  return do_colon_op (base, octave_value (), limit, is_for_cmd_expr);
1285  }
1286 
1287  friend OCTINTERP_API octave_value do_colon_op (const octave_value& base,
1288  const octave_value& increment,
1289  const octave_value& limit,
1290  bool is_for_cmd_expr);
1291 
1292  const octave_base_value& get_rep (void) const { return *rep; }
1293 
1294  bool is_copy_of (const octave_value& val) const { return rep == val.rep; }
1295 
1296  void print_info (std::ostream& os,
1297  const std::string& prefix = "") const;
1298 
1299  bool save_ascii (std::ostream& os) { return rep->save_ascii (os); }
1300 
1301  bool load_ascii (std::istream& is) { return rep->load_ascii (is); }
1302 
1303  bool save_binary (std::ostream& os, bool save_as_floats)
1304  { return rep->save_binary (os, save_as_floats); }
1305 
1306  bool load_binary (std::istream& is, bool swap,
1308  { return rep->load_binary (is, swap, fmt); }
1309 
1310  bool save_hdf5 (octave_hdf5_id loc_id, const char *name,
1311  bool save_as_floats)
1312  { return rep->save_hdf5 (loc_id, name, save_as_floats); }
1313 
1314  bool load_hdf5 (octave_hdf5_id loc_id, const char *name)
1315  { return rep->load_hdf5 (loc_id, name); }
1316 
1317  int write (octave::stream& os, int block_size,
1318  oct_data_conv::data_type output_type, int skip,
1319  octave::mach_info::float_format flt_fmt) const;
1320 
1321  octave_base_value * internal_rep (void) const { return rep; }
1322 
1323  // Unsafe. These functions exist to support the MEX interface.
1324  // You should not use them anywhere else.
1325  void * mex_get_data (void) const { return rep->mex_get_data (); }
1326 
1327  octave_idx_type * mex_get_ir (void) const { return rep->mex_get_ir (); }
1328 
1329  octave_idx_type * mex_get_jc (void) const { return rep->mex_get_jc (); }
1330 
1331  mxArray * as_mxArray (void) const { return rep->as_mxArray (); }
1332 
1334  { return rep->diag (k); }
1335 
1337  { return rep->diag (m, n); }
1338 
1340  { return rep->sort (dim, mode); }
1342  sortmode mode = ASCENDING) const
1343  { return rep->sort (sidx, dim, mode); }
1344 
1346  { return rep->issorted (mode); }
1347 
1349  { return rep->sort_rows_idx (mode); }
1350 
1352  { return rep->is_sorted_rows (mode); }
1353 
1354  void lock (void) { rep->lock (); }
1355 
1356  void unlock (void) { rep->unlock (); }
1357 
1358  bool islocked (void) const { return rep->islocked (); }
1359 
1360  void call_object_destructor (void) { return rep->call_object_destructor (); }
1361 
1362  octave_value dump (void) const { return rep->dump (); }
1363 
1364 #define MAPPER_FORWARD(F) \
1365  octave_value F (void) const \
1366  { \
1367  return rep->map (octave_base_value::umap_ ## F); \
1368  }
1369 
1415 
1416  // These functions are prefixed with X to avoid potential macro conflicts.
1417 
1418  MAPPER_FORWARD (xisalnum)
1419  MAPPER_FORWARD (xisalpha)
1421  MAPPER_FORWARD (xiscntrl)
1422  MAPPER_FORWARD (xisdigit)
1423  MAPPER_FORWARD (xisgraph)
1424  MAPPER_FORWARD (xislower)
1425  MAPPER_FORWARD (xisprint)
1426  MAPPER_FORWARD (xispunct)
1427  MAPPER_FORWARD (xisspace)
1428  MAPPER_FORWARD (xisupper)
1429  MAPPER_FORWARD (xisxdigit)
1430  MAPPER_FORWARD (xsignbit)
1431  MAPPER_FORWARD (xtolower)
1432  MAPPER_FORWARD (xtoupper)
1433 
1434 #undef MAPPER_FORWARD
1435 
1437  { return rep->map (umap); }
1438 
1439  //! Extract the n-th element, aka 'val(n)'.
1440  //!
1441  //! @return Result is undefined if 'val' is not an array type
1442  //! or @p n is out of range.
1443  //!
1444  //! @warning Function calls should never error.
1445 
1446  octave_value
1448  { return rep->fast_elem_extract (n); }
1449 
1450  //! Assign the n-th element, aka 'val(n) = x'.
1451  //!
1452  //! @returns false if 'val' is not an array type,
1453  //! @p x is not a matching scalar type,
1454  //! or @p n is out of range.
1455  //!
1456  //! @warning Function calls should never error.
1457 
1458  bool
1460  {
1461  make_unique ();
1462  return rep->fast_elem_insert (n, x);
1463  }
1464 
1465 protected:
1466 
1467  //! The real representation.
1469 
1470 private:
1471 
1472  static octave_base_value *nil_rep (void);
1473 
1474  assign_op unary_op_to_assign_op (unary_op op);
1475 
1476  binary_op op_eq_to_binary_op (assign_op op);
1477 
1478  // This declaration protects against constructing octave_value from
1479  // const octave_base_value* which actually silently calls octave_value (bool).
1481 
1482 };
1483 
1484 // Publish externally used friend functions. Which compiler requires
1485 // these extra declarations?
1486 
1487 extern OCTINTERP_API octave_value
1489  const octave_value& a);
1490 
1491 extern OCTINTERP_API octave_value
1493 
1494 extern OCTINTERP_API octave_value
1496  const octave_value& a, const octave_value& b);
1497 
1498 extern OCTINTERP_API octave_value
1500  const octave_value& a, const octave_value& b);
1501 
1502 extern OCTINTERP_API octave_value
1504  const octave_value& b);
1505 
1506 extern OCTINTERP_API octave_value
1508  const octave_value& b);
1509 
1510 extern OCTINTERP_API octave_value
1512  const octave_value& b, const Array<octave_idx_type>& ra_idx);
1513 
1514 extern OCTINTERP_API octave_value
1517 
1518 #define OV_UNOP_FN(name) \
1519  inline octave_value \
1520  name (const octave_value& a) \
1521  { \
1522  return do_unary_op (octave_value::name, a); \
1523  }
1524 
1525 #define OV_UNOP_OP(name, op) \
1526  inline octave_value \
1527  operator op (const octave_value& a) \
1528  { \
1529  return name (a); \
1530  }
1531 
1532 #define OV_UNOP_FN_OP(name, op) \
1533  OV_UNOP_FN (name) \
1534  OV_UNOP_OP (name, op)
1535 
1539 
1542 
1543 // No simple way to define these for prefix and suffix ops?
1544 //
1545 // incr
1546 // decr
1547 
1548 #define OV_BINOP_FN(name) \
1549  inline octave_value \
1550  name (const octave_value& a1, const octave_value& a2) \
1551  { \
1552  return do_binary_op (octave_value::name, a1, a2); \
1553  }
1554 
1555 #define OV_BINOP_OP(name, op) \
1556  inline octave_value \
1557  operator op (const octave_value& a1, const octave_value& a2) \
1558  { \
1559  return name (a1, a2); \
1560  }
1561 
1562 #define OV_BINOP_FN_OP(name, op) \
1563  OV_BINOP_FN (name) \
1564  OV_BINOP_OP (name, op)
1565 
1570 
1573 
1580 
1587 
1589 
1590 #define OV_COMP_BINOP_FN(name) \
1591  inline octave_value \
1592  name (const octave_value& a1, const octave_value& a2) \
1593  { \
1594  return do_binary_op (octave_value::name, a1, a2); \
1595  }
1596 
1601 
1602 extern OCTINTERP_API void install_types (octave::type_info&);
1603 
1604 // Templated value extractors.
1605 template <typename Value>
1606 inline Value octave_value_extract (const octave_value&)
1607 { assert (false); }
1608 
1609 #define DEF_VALUE_EXTRACTOR(VALUE,MPREFIX) \
1610  template <> \
1611  inline VALUE octave_value_extract<VALUE> (const octave_value& v) \
1612  { \
1613  return v.MPREFIX ## _value (); \
1614  }
1615 
1617 DEF_VALUE_EXTRACTOR (float, float_scalar)
1621 
1630 
1636 
1646 
1652 
1656 DEF_VALUE_EXTRACTOR (FloatComplexColumnVector, float_complex_column_vector)
1657 
1661 DEF_VALUE_EXTRACTOR (FloatComplexRowVector, float_complex_row_vector)
1662 
1666 DEF_VALUE_EXTRACTOR (FloatComplexDiagMatrix, float_complex_diag_matrix)
1668 
1672 #undef DEF_VALUE_EXTRACTOR
1673 
1674 #define DEF_DUMMY_VALUE_EXTRACTOR(VALUE,DEFVAL) \
1675  template <> \
1676  inline VALUE octave_value_extract<VALUE> (const octave_value&) \
1677  { \
1678  assert (false); \
1679  return DEFVAL; \
1680  }
1681 
1684 #undef DEF_DUMMY_VALUE_EXTRACTOR
1685 
1686 #endif
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:217
#define C(a, b)
Definition: Faddeeva.cc:246
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Sort by rows returns only indices.
Definition: Array.cc:2066
size_type size(const size_type d) const
Size of the specified dimension.
Definition: Array.h:442
Definition: Cell.h:43
Definition: dMatrix.h:42
Definition: Range.h:40
Definition: Sparse.h:49
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:95
octave::refcount< octave_idx_type > count
Definition: ov-base.h:860
virtual octave_base_value * empty_clone(void) const
Definition: ov-base.cc:106
virtual octave_base_value * try_narrowing_conversion(void)
Definition: ov-base.h:275
virtual octave_base_value * find_parent_class(const std::string &)
Definition: ov-base.h:612
octave_value_list & operator=(const octave_value_list &obj)=default
bool is_function(void) const
Definition: ov.h:730
octave_value(octave_value &&a)
Definition: ov.h:311
void maybe_economize(void)
Definition: ov.h:1198
std::string get_dims_str(void) const
string_vector xstring_vector_value(const char *fmt,...) const
MatrixType matrix_type(void) const
Definition: ov.h:542
octave_value(const octave_uint64 &i)
octave_value(const Sparse< Complex > &m, const MatrixType &t=MatrixType())
octave_value eval(void)
Definition: ov.h:755
SparseMatrix xsparse_matrix_value(const char *fmt,...) const
bool is_classdef_object(void) const
Definition: ov.h:611
ColumnVector xcolumn_vector_value(const char *fmt,...) const
octave_value sort(Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
Definition: ov.h:1341
octave_int8 xint8_scalar_value(const char *fmt,...) const
void make_unique(int obsolete_copies)
Definition: ov.h:352
bool is_package(void) const
Definition: ov.h:617
RowVector xrow_vector_value(const char *fmt,...) const
uint64_t uint64_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:788
octave_idx_type get_count(void) const
Definition: ov.h:399
octave_idx_type length(void) const
octave_value(octave_base_value *new_rep, bool borrow=false)
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
Definition: ov.h:1233
int32NDArray int32_array_value(void) const
Definition: ov.h:909
bool iscellstr(void) const
Definition: ov.h:563
int64NDArray xint64_array_value(const char *fmt,...) const
boolNDArray bool_array_value(bool warn=false) const
Definition: ov.h:844
uint16NDArray uint16_array_value(void) const
Definition: ov.h:918
SparseMatrix sparse_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:853
ComplexRowVector complex_row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
bool iscell(void) const
Definition: ov.h:560
bool is_complex_matrix(void) const
Definition: ov.h:575
octave_value as_double(void) const
Definition: ov.h:418
int8NDArray xint8_array_value(const char *fmt,...) const
octave_value next_subsref(bool auto_add, const std::string &type, const std::list< octave_value_list > &idx, size_t skip=1)
Cell xcell_value(const char *fmt,...) const
bool is_dld_function(void) const
Definition: ov.h:745
const octave_base_value & get_rep(void) const
Definition: ov.h:1292
bool bool_value(bool warn=false) const
Definition: ov.h:838
octave_int64 int64_scalar_value(void) const
Definition: ov.h:888
bool isreal(void) const
Definition: ov.h:691
bool issparse(void) const
Definition: ov.h:706
int xnint_value(const char *fmt,...) const
octave_value convert_to_str_internal(bool pad, bool force, char type) const
Definition: ov.h:1221
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
Definition: ov.h:449
charMatrix char_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:847
octave_value(const Sparse< bool > &m, const MatrixType &t=MatrixType())
octave_uint8 uint8_scalar_value(void) const
Definition: ov.h:891
FloatComplexNDArray xfloat_complex_array_value(const char *fmt,...) const
DiagMatrix diag_matrix_value(bool force=false) const
Definition: ov.h:863
uint32NDArray xuint32_array_value(const char *fmt,...) const
octave_map xmap_value(const char *fmt,...) const
bool fast_elem_insert(octave_idx_type n, const octave_value &x)
Assign the n-th element, aka 'val(n) = x'.
Definition: ov.h:1459
octave_value(const octave_int16 &i)
FloatComplexDiagMatrix xfloat_complex_diag_matrix_value(const char *fmt,...) const
void erase_subfunctions(void)
Definition: ov.h:751
unsigned long int xulong_value(const char *fmt,...) const
void * mex_get_data(void) const
Definition: ov.h:1325
int16NDArray xint16_array_value(const char *fmt,...) const
octave_base_value::type_conv_info numeric_conversion_function(void) const
Definition: ov.h:401
octave_value(const Array< octave_uint8 > &inda)
octave_user_code * xuser_code_value(const char *fmt,...) const
bool is_instance_of(const std::string &cls_name) const
Definition: ov.h:961
octave_value(const uint8NDArray &inda)
octave_uint32 uint32_scalar_value(void) const
Definition: ov.h:897
void make_storable_value(void)
octave_function * xfunction_value(const char *fmt,...) const
octave_value_list xlist_value(const char *fmt,...) const
octave_user_function * user_function_value(bool silent=false) const
int int_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:765
bool is_uint16_type(void) const
Definition: ov.h:674
void print_with_name(std::ostream &os, const std::string &name) const
Definition: ov.h:1239
builtin_type_t builtin_type(void) const
Definition: ov.h:643
octave_value(const octave_map &m, const std::string &id, const std::list< std::string > &plist)
octave_value(const octave_base_value *)
octave_idx_type nnz(void) const
Definition: ov.h:524
unary_op
Definition: ov.h:83
@ op_hermitian
Definition: ov.h:88
@ num_unary_ops
Definition: ov.h:91
@ op_uminus
Definition: ov.h:86
@ op_not
Definition: ov.h:84
@ op_transpose
Definition: ov.h:87
@ op_uplus
Definition: ov.h:85
@ op_incr
Definition: ov.h:89
@ op_decr
Definition: ov.h:90
Array< std::string > xcellstr_value(const char *fmt,...) const
int type_id(void) const
Definition: ov.h:1252
bool is_constant(void) const
Definition: ov.h:718
friend OCTINTERP_API octave_value do_binary_op(octave::type_info &ti, compound_binary_op op, const octave_value &a, const octave_value &b)
mxArray * as_mxArray(void) const
Definition: ov.h:1331
bool is_char_matrix(void) const
Definition: ov.h:584
octave_value(const char *s, char type='\'')
bool is_bool_scalar(void) const
Definition: ov.h:578
int64_t int64_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:784
octave_value diag(octave_idx_type m, octave_idx_type n) const
Definition: ov.h:1336
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx, bool auto_add)
Definition: ov.h:453
short int short_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:758
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
Definition: ov.h:475
octave_value permute(const Array< int > &vec, bool inv=false) const
Definition: ov.h:533
friend OCTINTERP_API octave_value do_cat_op(octave::type_info &ti, const octave_value &a, const octave_value &b, const Array< octave_idx_type > &ra_idx)
bool is_true(void) const
Definition: ov.h:711
FloatDiagMatrix float_diag_matrix_value(bool force=false) const
Definition: ov.h:866
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:824
std::list< std::string > parent_class_name_list(void) const
Definition: ov.h:951
bool is_classdef_superclass_ref(void) const
Definition: ov.h:614
void short_disp(std::ostream &os) const
Definition: ov.h:1242
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
Definition: ov.h:1306
bool is_builtin_function(void) const
Definition: ov.h:742
octave_value(octave_value::magic_colon)
SparseBoolMatrix xsparse_bool_matrix_value(const char *fmt,...) const
double xscalar_value(const char *fmt,...) const
octave_value dump(void) const
Definition: ov.h:1362
Complex complex_value(bool frc_str_conv=false) const
Definition: ov.h:818
octave_value(const octave_uint16 &i)
bool is_int8_type(void) const
Definition: ov.h:659
octave_idx_type rows(void) const
Definition: ov.h:504
octave_int32 xint32_scalar_value(const char *fmt,...) const
float xfloat_scalar_value(const char *fmt,...) const
Array< FloatComplex > float_complex_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
octave_value as_uint64(void) const
Definition: ov.h:429
octave_value(const uint32NDArray &inda)
octave_value as_uint16(void) const
Definition: ov.h:427
FloatComplexDiagMatrix float_complex_diag_matrix_value(bool force=false) const
Definition: ov.h:873
bool isnumeric(void) const
Definition: ov.h:703
octave_value as_single(void) const
Definition: ov.h:419
octave_value undef_subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
octave_idx_type numel(void) const
Definition: ov.h:518
FloatMatrix xfloat_matrix_value(const char *fmt,...) const
octave_idx_type idx_type_value(bool req_int=false, bool frc_str_conv=false) const
bool is_scalar_type(void) const
Definition: ov.h:697
unsigned short int ushort_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:762
Complex xcomplex_value(const char *fmt,...) const
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
Definition: ov.h:1310
Array< octave_idx_type > xoctave_idx_type_vector_value(const char *fmt,...) const
octave_value full_value(void) const
Definition: ov.h:413
octave_value(const idx_vector &idx, bool lazy=true)
octave_value(const octave_map &m)
Range range_value(void) const
Definition: ov.h:938
Array< int > xint_vector_value(const char *fmt,...) const
octave_value(const int32NDArray &inda)
bool is_dq_string(void) const
Definition: ov.h:599
octave_value squeeze(void) const
Definition: ov.h:409
octave_value(const Array< octave_int64 > &inda)
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
Definition: ov.h:1339
octave_value(const int8NDArray &inda)
octave_value ipermute(const Array< int > &vec) const
Definition: ov.h:536
bool is_cs_list(void) const
Definition: ov.h:626
octave_base_value * internal_rep(void) const
Definition: ov.h:1321
bool print_as_scalar(void) const
Definition: ov.h:1227
octave_value(const octave_int8 &i)
size_t nparents(void) const
Definition: ov.h:948
void convert_to_row_or_column_vector(void)
Definition: ov.h:1224
bool is_string(void) const
Definition: ov.h:593
PermMatrix xperm_matrix_value(const char *fmt,...) const
octave_value(const octave_int64 &i)
ComplexMatrix xcomplex_matrix_value(const char *fmt,...) const
compound_binary_op
Definition: ov.h:121
@ op_herm_ldiv
Definition: ov.h:128
@ op_el_not_or
Definition: ov.h:130
@ op_el_not_and
Definition: ov.h:129
@ op_el_and_not
Definition: ov.h:131
@ op_mul_trans
Definition: ov.h:124
@ num_compound_binary_ops
Definition: ov.h:133
@ op_mul_herm
Definition: ov.h:126
@ op_trans_ldiv
Definition: ov.h:127
@ op_el_or_not
Definition: ov.h:132
@ op_herm_mul
Definition: ov.h:125
@ op_trans_mul
Definition: ov.h:123
bool xbool_value(const char *fmt,...) const
FloatComplexRowVector float_complex_row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
octave_value & assign(assign_op, const octave_value &rhs)
octave_user_code * user_code_value(bool silent=false) const
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
Definition: ov.h:831
bool is_copy_of(const octave_value &val) const
Definition: ov.h:1294
bool is_user_code(void) const
Definition: ov.h:739
octave_int16 xint16_scalar_value(const char *fmt,...) const
bool is_diag_matrix(void) const
Definition: ov.h:587
FloatRowVector float_row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
octave_base_value * empty_clone(void) const
Definition: ov.h:321
std::string edit_display(const float_display_format &fmt, octave_idx_type i, octave_idx_type j) const
Definition: ov.h:1246
FloatComplexMatrix xfloat_complex_matrix_value(const char *fmt,...) const
FloatComplexRowVector xfloat_complex_row_vector_value(const char *fmt,...) const
octave_value as_uint32(void) const
Definition: ov.h:428
octave_value(const SparseMatrix &m, const MatrixType &t=MatrixType())
void call_object_destructor(void)
Definition: ov.h:1360
uint64NDArray xuint64_array_value(const char *fmt,...) const
double xdouble_value(const char *fmt,...) const
octave_int8 int8_scalar_value(void) const
Definition: ov.h:879
bool save_binary(std::ostream &os, bool save_as_floats)
Definition: ov.h:1303
bool is_defined(void) const
Definition: ov.h:551
charNDArray char_array_value(bool frc_str_conv=false) const
Definition: ov.h:850
octave_int32 int32_scalar_value(void) const
Definition: ov.h:885
octave_uint16 uint16_scalar_value(void) const
Definition: ov.h:894
bool isinteger(void) const
Definition: ov.h:683
bool is_double_type(void) const
Definition: ov.h:648
FloatColumnVector float_column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
octave_value(void)
Definition: ov.h:175
bool save_ascii(std::ostream &os)
Definition: ov.h:1299
Cell cell_value(void) const
Matrix size(void)
Definition: ov.h:435
float float_scalar_value(bool frc_str_conv=false) const
Definition: ov.h:803
FloatComplex float_complex_value(bool frc_str_conv=false) const
Definition: ov.h:821
Array< FloatComplex > xfloat_complex_vector_value(const char *fmt,...) const
bool is_function_handle(void) const
Definition: ov.h:721
bool is_equal(const octave_value &) const
std::string class_name(void) const
Definition: ov.h:1256
octave_idx_type xnumel(const octave_value_list &idx)
Definition: ov.h:440
assign_op
Definition: ov.h:138
@ op_pow_eq
Definition: ov.h:145
@ op_asn_eq
Definition: ov.h:139
@ op_add_eq
Definition: ov.h:140
@ op_el_pow_eq
Definition: ov.h:149
@ op_mul_eq
Definition: ov.h:142
@ op_div_eq
Definition: ov.h:143
@ op_el_and_eq
Definition: ov.h:150
@ op_el_ldiv_eq
Definition: ov.h:148
@ op_sub_eq
Definition: ov.h:141
@ op_el_mul_eq
Definition: ov.h:146
@ op_el_or_eq
Definition: ov.h:151
@ op_el_div_eq
Definition: ov.h:147
@ num_assign_ops
Definition: ov.h:152
@ op_ldiv_eq
Definition: ov.h:144
bool is_uint32_type(void) const
Definition: ov.h:677
octave_idx_type columns(void) const
Definition: ov.h:506
Array< octave_idx_type > octave_idx_type_vector_value(bool req_int=false, bool frc_str_conv=false, bool frc_vec_conv=false) const
Range xrange_value(const char *fmt,...) const
bool is_classdef_meta(void) const
Definition: ov.h:608
int64_t xint64_value(const char *fmt,...) const
int8NDArray int8_array_value(void) const
Definition: ov.h:903
int ndims(void) const
Definition: ov.h:510
octave_fcn_handle * xfcn_handle_value(const char *fmt,...) const
charMatrix xchar_matrix_value(const char *fmt,...) const
bool is_user_script(void) const
Definition: ov.h:733
short int xshort_value(const char *fmt,...) const
friend OCTINTERP_API octave_value do_colon_op(const octave_value &base, const octave_value &limit, bool is_for_cmd_expr)
Definition: ov.h:1280
octave_user_script * xuser_script_value(const char *fmt,...) const
bool is_int64_type(void) const
Definition: ov.h:668
octave_value as_int64(void) const
Definition: ov.h:424
float float_value(bool frc_str_conv=false) const
Definition: ov.h:797
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
Definition: ov.h:1314
SparseComplexMatrix xsparse_complex_matrix_value(const char *fmt,...) const
ComplexDiagMatrix xcomplex_diag_matrix_value(const char *fmt,...) const
int64NDArray int64_array_value(void) const
Definition: ov.h:912
FloatNDArray xfloat_array_value(const char *fmt,...) const
octave_function * function_value(bool silent=false) const
bool isstruct(void) const
Definition: ov.h:605
unsigned long int ulong_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:780
uint8NDArray uint8_array_value(void) const
Definition: ov.h:915
octave_value any(int dim=0) const
Definition: ov.h:640
octave_value(const SparseBoolMatrix &bm, const MatrixType &t=MatrixType())
octave_value reshape(const dim_vector &dv) const
Definition: ov.h:530
octave_value & assign(assign_op op, const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
bool islocked(void) const
Definition: ov.h:1358
octave_value as_int16(void) const
Definition: ov.h:422
octave_int64 xint64_scalar_value(const char *fmt,...) const
double scalar_value(bool frc_str_conv=false) const
Definition: ov.h:800
octave_value as_uint8(void) const
Definition: ov.h:426
FloatComplexColumnVector float_complex_column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout)
bool isnull(void) const
Definition: ov.h:632
ComplexRowVector xcomplex_row_vector_value(const char *fmt,...) const
bool is_zero_by_zero(void) const
Definition: ov.h:515
bool load_ascii(std::istream &is)
Definition: ov.h:1301
octave_value next_subsref(const std::string &type, const std::list< octave_value_list > &idx, size_t skip=1)
octave_value as_int32(void) const
Definition: ov.h:423
octave_value(const Range &r, bool force_range=false)
octave_fcn_handle * fcn_handle_value(bool silent=false) const
boolMatrix bool_matrix_value(bool warn=false) const
Definition: ov.h:841
octave_idx_type nfields(void) const
Definition: ov.h:528
octave_value fast_elem_extract(octave_idx_type n) const
Extract the n-th element, aka 'val(n)'.
Definition: ov.h:1447
octave_value(const Array< octave_uint16 > &inda)
octave_value(const SparseComplexMatrix &m, const MatrixType &t=MatrixType())
void unlock(void)
Definition: ov.h:1356
magic_colon
Definition: ov.h:173
std::string string_value(bool force=false) const
Definition: ov.h:927
octave_value(const octave_scalar_map &m, const std::string &id, const std::list< std::string > &plist)
ComplexDiagMatrix complex_diag_matrix_value(bool force=false) const
Definition: ov.h:869
void lock(void)
Definition: ov.h:1354
int nint_value(bool frc_str_conv=false) const
Definition: ov.h:772
octave_value(const Array< char > &chnda, char type='\'')
friend OCTINTERP_API octave_value do_binary_op(octave::type_info &ti, binary_op op, const octave_value &a, const octave_value &b)
octave_uint8 xuint8_scalar_value(const char *fmt,...) const
bool is_mex_function(void) const
Definition: ov.h:748
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:809
octave_base_value * find_parent_class(const std::string &parent_class_name)
Definition: ov.h:958
octave_scalar_map xscalar_map_value(const char *fmt,...) const
string_vector parent_class_names(void) const
Definition: ov.h:954
bool isjava(void) const
Definition: ov.h:623
octave_idx_type xidx_type_value(const char *fmt,...) const
octave_value_list next_subsref(int nargout, const std::string &type, const std::list< octave_value_list > &idx, size_t skip=1)
bool is_matrix_type(void) const
Definition: ov.h:700
octave_scalar_map scalar_map_value(void) const
octave_value map(octave_base_value::unary_mapper_t umap) const
Definition: ov.h:1436
bool is_int32_type(void) const
Definition: ov.h:665
charNDArray xchar_array_value(const char *fmt,...) const
octave_value storable_value(void) const
octave_value(const octave_uint8 &i)
bool is_uint64_type(void) const
Definition: ov.h:680
octave_idx_type nzmax(void) const
Definition: ov.h:526
bool is_int16_type(void) const
Definition: ov.h:662
void make_unique(void)
Definition: ov.h:336
octave_value(const Array< octave_int32 > &inda)
long int long_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:776
uint64NDArray uint64_array_value(void) const
Definition: ov.h:924
Array< float > xfloat_vector_value(const char *fmt,...) const
ComplexNDArray xcomplex_array_value(const char *fmt,...) const
binary_op
Definition: ov.h:96
@ op_ldiv
Definition: ov.h:102
@ op_ne
Definition: ov.h:108
@ op_el_or
Definition: ov.h:114
@ op_el_ldiv
Definition: ov.h:112
@ op_pow
Definition: ov.h:101
@ op_ge
Definition: ov.h:106
@ num_binary_ops
Definition: ov.h:116
@ op_div
Definition: ov.h:100
@ op_el_pow
Definition: ov.h:111
@ op_mul
Definition: ov.h:99
@ op_add
Definition: ov.h:97
@ op_sub
Definition: ov.h:98
@ op_el_mul
Definition: ov.h:109
@ op_le
Definition: ov.h:104
@ op_struct_ref
Definition: ov.h:115
@ op_lt
Definition: ov.h:103
@ op_gt
Definition: ov.h:107
@ op_eq
Definition: ov.h:105
@ op_el_and
Definition: ov.h:113
@ op_el_div
Definition: ov.h:110
string_vector string_vector_value(bool pad=false) const
Definition: ov.h:930
PermMatrix perm_matrix_value(void) const
Definition: ov.h:876
octave_value(const Array< octave_int16 > &inda)
octave_base_value::type_conv_info numeric_demotion_function(void) const
Definition: ov.h:404
~octave_value(void)
Definition: ov.h:326
ComplexColumnVector xcomplex_column_vector_value(const char *fmt,...) const
sortmode is_sorted_rows(sortmode mode=UNSORTED) const
Definition: ov.h:1351
octave_uint64 xuint64_scalar_value(const char *fmt,...) const
bool is_anonymous_function(void) const
Definition: ov.h:724
octave_value single_subsref(const std::string &type, const octave_value_list &idx)
bool is_range(void) const
Definition: ov.h:602
size_t byte_size(void) const
Definition: ov.h:521
void maybe_mutate(void)
ComplexColumnVector complex_column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
octave_value(const Array< octave_idx_type > &inda, bool zero_based=false, bool cache_index=false)
octave_uint32 xuint32_scalar_value(const char *fmt,...) const
octave_classdef * classdef_object_value(bool silent=false) const
octave_base_value * try_narrowing_conversion(void)
Definition: ov.h:431
octave_uint64 uint64_scalar_value(void) const
Definition: ov.h:900
bool all_zero_dims(void) const
Definition: ov.h:512
bool isempty(void) const
Definition: ov.h:557
SparseBoolMatrix sparse_bool_matrix_value(bool warn=false) const
Definition: ov.h:860
NDArray array_value(bool frc_str_conv=false) const
Definition: ov.h:812
Array< Complex > xcomplex_vector_value(const char *fmt,...) const
FloatComplex xfloat_complex_value(const char *fmt,...) const
octave_value(const uint64NDArray &inda)
bool is_real_matrix(void) const
Definition: ov.h:569
int write(octave::stream &os, int block_size, oct_data_conv::data_type output_type, int skip, octave::mach_info::float_format flt_fmt) const
uint16NDArray xuint16_array_value(const char *fmt,...) const
Array< double > vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
octave_value(const std::map< std::string, octave_value > &)
octave_idx_type * mex_get_jc(void) const
Definition: ov.h:1329
bool is_single_type(void) const
Definition: ov.h:651
octave_value(const octave_value_list &m)
octave_value(const Sparse< double > &m, const MatrixType &t=MatrixType())
FloatRowVector xfloat_row_vector_value(const char *fmt,...) const
uint32NDArray uint32_array_value(void) const
Definition: ov.h:921
octave_value(const octave_uint32 &i)
octave_value convert_to_str(bool pad=false, bool force=false, char type='\'') const
Definition: ov.h:1216
bool print_name_tag(std::ostream &os, const std::string &name) const
Definition: ov.h:1236
octave_uint16 xuint16_scalar_value(const char *fmt,...) const
octave_value_list list_value(void) const
sortmode issorted(sortmode mode=UNSORTED) const
Definition: ov.h:1345
long int xlong_value(const char *fmt,...) const
octave_value all(int dim=0) const
Definition: ov.h:637
Array< float > float_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
bool isobject(void) const
Definition: ov.h:620
int xint_value(const char *fmt,...) const
std::string xstring_value(const char *fmt,...) const
uint64_t xuint64_value(const char *fmt,...) const
octave_idx_type * mex_get_ir(void) const
Definition: ov.h:1327
octave_map map_value(void) const
bool is_sq_string(void) const
Definition: ov.h:596
FloatComplexColumnVector xfloat_complex_column_vector_value(const char *fmt,...) const
FloatDiagMatrix xfloat_diag_matrix_value(const char *fmt,...) const
boolNDArray xbool_array_value(const char *fmt,...) const
bool is_real_scalar(void) const
Definition: ov.h:566
Array< double > xvector_value(const char *fmt,...) const
idx_vector index_vector(bool require_integers=false) const
Definition: ov.h:493
bool is_undefined(void) const
Definition: ov.h:554
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
Definition: ov.h:835
octave_value(const octave_int32 &i)
octave_base_value * rep
The real representation.
Definition: ov.h:1468
ColumnVector column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
int32NDArray xint32_array_value(const char *fmt,...) const
octave_value resize(const dim_vector &dv, bool fill=false) const
Definition: ov.h:539
float xfloat_value(const char *fmt,...) const
DiagMatrix xdiag_matrix_value(const char *fmt,...) const
Array< Complex > complex_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
Array< int > int_vector_value(bool req_int=false, bool frc_str_conv=false, bool frc_vec_conv=false) const
FloatNDArray float_array_value(bool frc_str_conv=false) const
Definition: ov.h:815
octave_value(const octave_value &a)
Definition: ov.h:305
Matrix xmatrix_value(const char *fmt,...) const
octave_int16 int16_scalar_value(void) const
Definition: ov.h:882
Array< std::string > cellstr_value(void) const
Definition: ov.h:935
bool is_user_function(void) const
Definition: ov.h:736
NDArray xarray_value(const char *fmt,...) const
bool is_uint8_type(void) const
Definition: ov.h:671
RowVector row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
int16NDArray int16_array_value(void) const
Definition: ov.h:906
float_display_format get_edit_display_format(void) const
MatrixType matrix_type(const MatrixType &typ) const
Definition: ov.h:545
string_vector map_keys(void) const
Definition: ov.h:945
FloatColumnVector xfloat_column_vector_value(const char *fmt,...) const
octave_value(const int64NDArray &inda)
bool is_inline_function(void) const
Definition: ov.h:727
octave_value(const Array< std::string > &cellstr)
octave_value(const octave_scalar_map &m)
friend OCTINTERP_API octave_value do_colon_op(const octave_value &base, const octave_value &increment, const octave_value &limit, bool is_for_cmd_expr)
octave_value(const uint16NDArray &inda)
octave_base_value * clone(void) const
Matrix matrix_value(bool frc_str_conv=false) const
Definition: ov.h:806
bool is_perm_matrix(void) const
Definition: ov.h:590
octave_value(const Array< octave_int8 > &inda)
octave_value(const charNDArray &chnda, char type='\'')
FloatComplexMatrix float_complex_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:828
void print(std::ostream &os, bool pr_as_read_syntax=false)
Definition: ov.h:1230
bool iscomplex(void) const
Definition: ov.h:694
bool is_magic_colon(void) const
Definition: ov.h:629
octave_value diag(octave_idx_type k=0) const
Definition: ov.h:1333
octave_value(const Array< octave_uint32 > &inda)
double double_value(bool frc_str_conv=false) const
Definition: ov.h:794
unsigned int uint_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:769
bool is_complex_scalar(void) const
Definition: ov.h:572
boolMatrix xbool_matrix_value(const char *fmt,...) const
bool is_bool_matrix(void) const
Definition: ov.h:581
unsigned int xuint_value(const char *fmt,...) const
octave_value(const int16NDArray &inda)
octave_value as_int8(void) const
Definition: ov.h:421
std::string type_name(void) const
Definition: ov.h:1254
octave_user_function * xuser_function_value(const char *fmt,...) const
bool islogical(void) const
Definition: ov.h:688
bool isfloat(void) const
Definition: ov.h:654
dim_vector dims(void) const
Definition: ov.h:500
SparseComplexMatrix sparse_complex_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:857
octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
unsigned short int xushort_value(const char *fmt,...) const
octave_user_script * user_script_value(bool silent=false) const
octave_value(double base, double limit, double inc)
octave_value(const string_vector &s, char type='\'')
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Definition: ov.h:1348
uint8NDArray xuint8_array_value(const char *fmt,...) const
octave_value(const Array< octave_uint64 > &inda)
ColumnVector real(const ComplexColumnVector &a)
Definition: dColVector.cc:137
ColumnVector imag(const ComplexColumnVector &a)
Definition: dColVector.cc:143
function gamma(X)
Definition: gamma.f:3
QString name
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
F77_RET_T const F77_DBLE * x
T octave_idx_type m
Definition: mx-inlines.cc:773
octave_idx_type n
Definition: mx-inlines.cc:753
T * r
Definition: mx-inlines.cc:773
std::complex< double > erfc(std::complex< double > z, double relerr=0)
std::complex< double > erfcx(std::complex< double > z, double relerr=0)
std::complex< double > erfi(std::complex< double > z, double relerr=0)
std::complex< double > erf(std::complex< double > z, double relerr=0)
double fix(double x)
Definition: lo-mappers.h:118
Complex atan(const Complex &x)
Definition: lo-mappers.h:71
double signum(double x)
Definition: lo-mappers.h:222
double asinh(double x)
Definition: lo-specfun.h:69
bool isna(double x)
Definition: lo-mappers.cc:47
double atanh(double x)
Definition: lo-specfun.h:74
bool isfinite(double x)
Definition: lo-mappers.h:192
double roundb(double x)
Definition: lo-mappers.h:147
bool isnan(bool)
Definition: lo-mappers.h:178
Complex log1p(const Complex &x)
Definition: lo-specfun.cc:1958
bool isinf(double x)
Definition: lo-mappers.h:203
Complex acos(const Complex &x)
Definition: lo-mappers.cc:85
double round(double x)
Definition: lo-mappers.h:136
Complex asin(const Complex &x)
Definition: lo-mappers.cc:107
double acosh(double x)
Definition: lo-specfun.h:51
double erfcinv(double x)
Definition: lo-specfun.cc:1744
std::complex< T > ceil(const std::complex< T > &x)
Definition: lo-mappers.h:103
double lgamma(double x)
Definition: lo-specfun.h:347
double erfinv(double x)
Definition: lo-specfun.cc:1863
double dawson(double x)
Definition: lo-specfun.cc:1517
double cbrt(double x)
Definition: lo-specfun.h:300
Complex log2(const Complex &x)
Definition: lo-mappers.cc:139
std::complex< T > floor(const std::complex< T > &x)
Definition: lo-mappers.h:130
Complex expm1(const Complex &x)
Definition: lo-specfun.cc:1874
std::complex< double > Complex
Definition: oct-cmplx.h:33
std::complex< float > FloatComplex
Definition: oct-cmplx.h:34
int64_t octave_hdf5_id
sortmode
Definition: oct-sort.h:95
@ UNSORTED
Definition: oct-sort.h:95
@ ASCENDING
Definition: oct-sort.h:95
const octave_base_value const Array< octave_idx_type > & ra_idx
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
builtin_type_t
Definition: ov-base.h:72
static int xisascii(int c)
Definition: ov-ch-mat.cc:246
static bool scalar(const dim_vector &dims)
Definition: ov-struct.cc:669
octave_value op_ne(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1579
octave_value op_el_ldiv(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1584
octave_value op_uplus(const octave_value &a)
Definition: ov.h:1537
octave_value op_add(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1566
OCTINTERP_API octave_value do_unary_op(octave::type_info &ti, octave_value::unary_op op, const octave_value &a)
Definition: ov.cc:2635
octave_value op_gt(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1578
octave_value op_uminus(const octave_value &a)
Definition: ov.h:1538
octave_value op_el_div(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1582
#define DEF_DUMMY_VALUE_EXTRACTOR(VALUE, DEFVAL)
Definition: ov.h:1674
octave_value op_mul_herm(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1600
octave_value op_transpose(const octave_value &a)
Definition: ov.h:1540
OCTINTERP_API void install_types(octave::type_info &)
Definition: ov.cc:2914
octave_value op_el_or(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1586
octave_value op_sub(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1567
OCTINTERP_API octave_value do_cat_op(octave::type_info &ti, const octave_value &a, const octave_value &b, const Array< octave_idx_type > &ra_idx)
octave_value op_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1568
octave_value op_hermitian(const octave_value &a)
Definition: ov.h:1541
OCTINTERP_API octave_value do_colon_op(const octave_value &base, const octave_value &limit, bool is_for_cmd_expr=false)
Definition: ov.h:1280
#define OV_COMP_BINOP_FN(name)
Definition: ov.h:1590
octave_value op_le(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1575
octave_value op_el_and(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1585
octave_value op_herm_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1599
#define MAPPER_FORWARD(F)
Definition: ov.h:1364
octave_value op_eq(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1576
octave_value op_el_pow(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1583
#define OV_UNOP_FN_OP(name, op)
Definition: ov.h:1532
#define DEF_VALUE_EXTRACTOR(VALUE, MPREFIX)
Definition: ov.h:1609
OCTINTERP_API octave_value do_binary_op(octave::type_info &ti, octave_value::binary_op op, const octave_value &a, const octave_value &b)
octave_value op_struct_ref(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1588
octave_value op_not(const octave_value &a)
Definition: ov.h:1536
#define OV_BINOP_FN(name)
Definition: ov.h:1548
octave_value op_ldiv(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1572
#define OV_UNOP_FN(name)
Definition: ov.h:1518
Value octave_value_extract(const octave_value &)
Definition: ov.h:1606
octave_value op_pow(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1571
octave_value op_ge(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1577
octave_value op_el_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1581
octave_value op_div(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1569
octave_value op_trans_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1597
octave_value op_mul_trans(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1598
#define OV_BINOP_FN_OP(name, op)
Definition: ov.h:1562
octave_value op_lt(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1574
static T abs(T x)
Definition: pr-output.cc:1678