GNU Octave  8.1.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-2023 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 <memory>
37 #include <map>
38 
39 #include "Range.h"
40 #include "data-conv.h"
41 #include "idx-vector.h"
42 #include "mach-info.h"
43 #include "mx-base.h"
44 #include "oct-sort.h"
45 #include "oct-time.h"
46 #include "str-vec.h"
47 
49 
50 class stack_frame;
51 class type_info;
52 
54 
55 class Cell;
56 class float_format;
57 class mxArray;
58 class octave_map;
59 class octave_scalar_map;
60 class octave_function;
62 class octave_fcn_handle;
63 class octave_value_list;
64 
65 #include "mxtypes.h"
66 
67 #include "oct-stream.h"
68 #include "ov-base.h"
69 
70 class
71 OCTINTERP_API
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 OCTINTERP_API binary_op assign_op_to_binary_op (assign_op);
151 
152  static OCTINTERP_API assign_op binary_op_to_assign_op (binary_op);
153 
154  static OCTINTERP_API std::string unary_op_as_string (unary_op);
155  static OCTINTERP_API std::string unary_op_fcn_name (unary_op);
156 
157  static OCTINTERP_API std::string binary_op_as_string (binary_op);
158  static OCTINTERP_API std::string binary_op_fcn_name (binary_op);
159 
160  static OCTINTERP_API std::string binary_op_fcn_name (compound_binary_op);
161 
162  static OCTINTERP_API std::string assign_op_as_string (assign_op);
163 
164  static OCTINTERP_API octave_value
165  empty_conv (const std::string& type,
166  const octave_value& rhs = octave_value ());
167 
168  enum magic_colon { magic_colon_t };
169 
171  : m_rep (nil_rep ())
172  {
173  m_rep->count++;
174  }
175 
176  OCTINTERP_API octave_value (short int i);
177  OCTINTERP_API octave_value (unsigned short int i);
178  OCTINTERP_API octave_value (int i);
179  OCTINTERP_API octave_value (unsigned int i);
180  OCTINTERP_API octave_value (long int i);
181  OCTINTERP_API octave_value (unsigned long int i);
182 
183  // FIXME: These are kluges. They turn into doubles internally, which will
184  // break for very large values. We just use them to store things like
185  // 64-bit ino_t, etc, and hope that those values are never actually larger
186  // than can be represented exactly in a double.
187 
188 #if defined (OCTAVE_HAVE_LONG_LONG_INT)
189  OCTINTERP_API octave_value (long long int i);
190 #endif
191 #if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT)
192  OCTINTERP_API octave_value (unsigned long long int i);
193 #endif
194 
195  OCTINTERP_API octave_value (octave::sys::time t);
196  OCTINTERP_API octave_value (double d);
197  OCTINTERP_API octave_value (float d);
198  OCTINTERP_API octave_value (const Array<octave_value>& a,
199  bool is_cs_list = false);
200  OCTINTERP_API octave_value (const Cell& c, bool is_cs_list = false);
201  OCTINTERP_API octave_value (const Matrix& m,
202  const MatrixType& t = MatrixType ());
203  OCTINTERP_API octave_value (const FloatMatrix& m,
204  const MatrixType& t = MatrixType ());
205  OCTINTERP_API octave_value (const NDArray& nda);
206  OCTINTERP_API octave_value (const FloatNDArray& nda);
207  OCTINTERP_API octave_value (const Array<double>& m);
208  OCTINTERP_API octave_value (const Array<float>& m);
209  OCTINTERP_API octave_value (const DiagMatrix& d);
210  OCTINTERP_API octave_value (const DiagArray2<double>& d);
211  OCTINTERP_API octave_value (const DiagArray2<float>& d);
212  OCTINTERP_API octave_value (const DiagArray2<Complex>& d);
213  OCTINTERP_API octave_value (const DiagArray2<FloatComplex>& d);
214  OCTINTERP_API octave_value (const FloatDiagMatrix& d);
215  OCTINTERP_API octave_value (const RowVector& v);
216  OCTINTERP_API octave_value (const FloatRowVector& v);
217  OCTINTERP_API octave_value (const ColumnVector& v);
218  OCTINTERP_API octave_value (const FloatColumnVector& v);
219  OCTINTERP_API octave_value (const Complex& C);
220  OCTINTERP_API octave_value (const FloatComplex& C);
221  OCTINTERP_API octave_value (const ComplexMatrix& m,
222  const MatrixType& t = MatrixType ());
223  OCTINTERP_API octave_value (const FloatComplexMatrix& m,
224  const MatrixType& t = MatrixType ());
225  OCTINTERP_API octave_value (const ComplexNDArray& cnda);
226  OCTINTERP_API octave_value (const FloatComplexNDArray& cnda);
227  OCTINTERP_API octave_value (const Array<Complex>& m);
228  OCTINTERP_API octave_value (const Array<FloatComplex>& m);
229  OCTINTERP_API octave_value (const ComplexDiagMatrix& d);
230  OCTINTERP_API octave_value (const FloatComplexDiagMatrix& d);
231  OCTINTERP_API octave_value (const ComplexRowVector& v);
232  OCTINTERP_API octave_value (const FloatComplexRowVector& v);
233  OCTINTERP_API octave_value (const ComplexColumnVector& v);
234  OCTINTERP_API octave_value (const FloatComplexColumnVector& v);
235  OCTINTERP_API octave_value (const PermMatrix& p);
236  OCTINTERP_API octave_value (bool b);
237  OCTINTERP_API octave_value (const boolMatrix& bm,
238  const MatrixType& t = MatrixType ());
239  OCTINTERP_API octave_value (const boolNDArray& bnda);
240  OCTINTERP_API octave_value (const Array<bool>& bnda);
241  OCTINTERP_API octave_value (char c, char type = '\'');
242  OCTINTERP_API octave_value (const char *s, char type = '\'');
243  OCTINTERP_API octave_value (const std::string& s, char type = '\'');
244  OCTINTERP_API octave_value (const string_vector& s, char type = '\'');
245  OCTINTERP_API octave_value (const charMatrix& chm, char type = '\'');
246  OCTINTERP_API octave_value (const charNDArray& chnda, char type = '\'');
247  OCTINTERP_API octave_value (const Array<char>& chnda, char type = '\'');
248 
249  OCTINTERP_API octave_value (const SparseMatrix& m,
250  const MatrixType& t = MatrixType ());
251  OCTINTERP_API octave_value (const Sparse<double>& m,
252  const MatrixType& t = MatrixType ());
253  OCTINTERP_API octave_value (const SparseComplexMatrix& m,
254  const MatrixType& t = MatrixType ());
255  OCTINTERP_API octave_value (const Sparse<Complex>& m,
256  const MatrixType& t = MatrixType ());
257  OCTINTERP_API octave_value (const SparseBoolMatrix& bm,
258  const MatrixType& t = MatrixType ());
259  OCTINTERP_API octave_value (const Sparse<bool>& m,
260  const MatrixType& t = MatrixType ());
261  OCTINTERP_API octave_value (const octave_int8& i);
262  OCTINTERP_API octave_value (const octave_int16& i);
263  OCTINTERP_API octave_value (const octave_int32& i);
264  OCTINTERP_API octave_value (const octave_int64& i);
265  OCTINTERP_API octave_value (const octave_uint8& i);
266  OCTINTERP_API octave_value (const octave_uint16& i);
267  OCTINTERP_API octave_value (const octave_uint32& i);
268  OCTINTERP_API octave_value (const octave_uint64& i);
269  OCTINTERP_API octave_value (const int8NDArray& inda);
270  OCTINTERP_API octave_value (const Array<octave_int8>& inda);
271  OCTINTERP_API octave_value (const int16NDArray& inda);
272  OCTINTERP_API octave_value (const Array<octave_int16>& inda);
273  OCTINTERP_API octave_value (const int32NDArray& inda);
274  OCTINTERP_API octave_value (const Array<octave_int32>& inda);
275  OCTINTERP_API octave_value (const int64NDArray& inda);
276  OCTINTERP_API octave_value (const Array<octave_int64>& inda);
277  OCTINTERP_API octave_value (const uint8NDArray& inda);
278  OCTINTERP_API octave_value (const Array<octave_uint8>& inda);
279  OCTINTERP_API octave_value (const uint16NDArray& inda);
280  OCTINTERP_API octave_value (const Array<octave_uint16>& inda);
281  OCTINTERP_API octave_value (const uint32NDArray& inda);
282  OCTINTERP_API octave_value (const Array<octave_uint32>& inda);
283  OCTINTERP_API octave_value (const uint64NDArray& inda);
284  OCTINTERP_API octave_value (const Array<octave_uint64>& inda);
285  OCTINTERP_API octave_value (const Array<octave_idx_type>& inda,
286  bool zero_based = false,
287  bool cache_index = false);
288  OCTINTERP_API octave_value (const Array<std::string>& cellstr);
289  OCTINTERP_API octave_value (const octave::idx_vector& idx, bool lazy = true);
290 
291 private:
292 
293  // Remove when public constructors that use this function are removed.
294  static OCTINTERP_API octave_base_value *
295  make_range_rep_deprecated (double base, double inc, double limit);
296 
297  // Remove when public constructors that use this function are removed.
298  static OCTINTERP_API octave_base_value *
299  make_range_rep_deprecated (const Range& r, bool force_range);
300 
301 public:
302 
303 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
304  OCTAVE_DEPRECATED (7, "use 'octave_value (range<double>&)' instead")
305  octave_value (double base, double limit, double inc)
306  : m_rep (make_range_rep_deprecated (base, inc, limit))
307  {
308  maybe_mutate ();
309  }
310 
311  OCTAVE_DEPRECATED (7, "use 'octave_value (range<double>&)' instead")
312  octave_value (const Range& r, bool force_range = false)
313  : m_rep (make_range_rep_deprecated (r, force_range))
314  {
315  maybe_mutate ();
316  }
317 #endif
318 
319  OCTINTERP_API octave_value (const octave::range<double>& r,
320  bool force_range = false);
321 
322  // For now, disable all but range<double>.
323 
324 #if 0
325 
326  OCTINTERP_API octave_value (const octave::range<float>& r,
327  bool force_range = false);
328 
329  OCTINTERP_API octave_value (const octave::range<octave_int8>& r,
330  bool force_range = false);
331 
332  OCTINTERP_API octave_value (const octave::range<octave_int16>& r,
333  bool force_range = false);
334 
335  OCTINTERP_API octave_value (const octave::range<octave_int32>& r,
336  bool force_range = false);
337 
338  OCTINTERP_API octave_value (const octave::range<octave_int64>& r,
339  bool force_range = false);
340 
341  OCTINTERP_API octave_value (const octave::range<octave_uint8>& r,
342  bool force_range = false);
343 
344  OCTINTERP_API octave_value (const octave::range<octave_uint16>& r,
345  bool force_range = false);
346 
347  OCTINTERP_API octave_value (const octave::range<octave_uint32>& r,
348  bool force_range = false);
349 
350  OCTINTERP_API octave_value (const octave::range<octave_uint64>& r,
351  bool force_range = false);
352 
353  OCTINTERP_API octave_value (const octave::range<char>& r, char type,
354  bool force_range = false);
355 #endif
356 
357  OCTINTERP_API octave_value (const octave_map& m);
358  OCTINTERP_API octave_value (const octave_scalar_map& m);
359  OCTINTERP_API octave_value (const std::map<std::string, octave_value>&);
360  OCTINTERP_API octave_value (const octave_map& m, const std::string& id,
361  const std::list<std::string>& plist);
362  OCTINTERP_API octave_value (const octave_scalar_map& m, const std::string& id,
363  const std::list<std::string>& plist);
364 
365  // This one is explicit because it can cause some trouble to
366  // accidentally create a cs-list when one was not intended.
367  explicit OCTINTERP_API octave_value (const octave_value_list& m);
368 
370 
371  OCTINTERP_API octave_value (octave_base_value *new_rep, bool borrow = false);
372 
373  // Copy constructor.
374 
376  : m_rep (a.m_rep)
377  {
378  m_rep->count++;
379  }
380 
382  : m_rep (a.m_rep)
383  {
384  a.m_rep = nullptr;
385  }
386 
387  // This should only be called for derived types.
388 
389  OCTINTERP_API octave_base_value * clone (void) const;
390 
392  { return m_rep->empty_clone (); }
393 
394  // Delete the representation of this constant if the count drops to zero.
395 
397  {
398  // Because we define a move constructor and a move assignment
399  // operator, rep may be a nullptr here. We should only need to
400  // protect the move assignment operator in a similar way.
401 
402  if (m_rep && --m_rep->count == 0 && m_rep != nil_rep ())
403  delete m_rep;
404  }
405 
406  void make_unique (void)
407  {
408  if (m_rep->count > 1)
409  {
410  octave_base_value *r = m_rep->unique_clone ();
411 
412  if (--m_rep->count == 0 && m_rep != nil_rep ())
413  delete m_rep;
414 
415  m_rep = r;
416  }
417  }
418 
419  // This uniquifies the value if it is referenced by more than a certain
420  // number of shallow copies. This is useful for optimizations where we
421  // know a certain copy, typically within a cell array, to be obsolete.
422  void make_unique (int obsolete_copies)
423  {
424  if (m_rep->count > obsolete_copies + 1)
425  {
426  octave_base_value *r = m_rep->unique_clone ();
427 
428  if (--m_rep->count == 0 && m_rep != nil_rep ())
429  delete m_rep;
430 
431  m_rep = r;
432  }
433  }
434 
435  // Convert any nested function handles in this object to use weak
436  // references to their enclosing stack frame context. Used to break
437  // shared_ptr reference cycles for handles to nested functions
438  // (closures).
439  void break_closure_cycles (const std::shared_ptr<octave::stack_frame>&);
440 
441  // Simple assignment.
442 
444  {
445  if (m_rep != a.m_rep)
446  {
447  if (--m_rep->count == 0 && m_rep != nil_rep ())
448  delete m_rep;
449 
450  m_rep = a.m_rep;
451  m_rep->count++;
452  }
453 
454  return *this;
455  }
456 
458  {
459  // Because we define a move constructor and a move assignment
460  // operator, rep may be a nullptr here. We should only need to
461  // protect the destructor in a similar way.
462 
463  if (this != &a)
464  {
465  if (m_rep && --m_rep->count == 0 && m_rep != nil_rep ())
466  delete m_rep;
467 
468  m_rep = a.m_rep;
469  a.m_rep = nullptr;
470  }
471 
472  return *this;
473  }
474 
475  octave_idx_type get_count (void) const { return m_rep->count; }
476 
478  { return m_rep->numeric_conversion_function (); }
479 
481  { return m_rep->numeric_demotion_function (); }
482 
483  OCTINTERP_API void maybe_mutate (void);
484 
485  octave_value squeeze (void) const
486  { return m_rep->squeeze (); }
487 
488  // The result of full().
490  { return m_rep->full_value (); }
491 
492  // Type conversions.
493 
494  octave_value as_double (void) const { return m_rep->as_double (); }
495  octave_value as_single (void) const { return m_rep->as_single (); }
496 
497  octave_value as_int8 (void) const { return m_rep->as_int8 (); }
498  octave_value as_int16 (void) const { return m_rep->as_int16 (); }
499  octave_value as_int32 (void) const { return m_rep->as_int32 (); }
500  octave_value as_int64 (void) const { return m_rep->as_int64 (); }
501 
502  octave_value as_uint8 (void) const { return m_rep->as_uint8 (); }
503  octave_value as_uint16 (void) const { return m_rep->as_uint16 (); }
504  octave_value as_uint32 (void) const { return m_rep->as_uint32 (); }
505  octave_value as_uint64 (void) const { return m_rep->as_uint64 (); }
506 
508  { return m_rep->try_narrowing_conversion (); }
509 
510  // Close to dims (), but can be overloaded for classes.
511  Matrix size (void)
512  { return m_rep->size (); }
513 
514  // FIXME: should this function be deprecated and removed? It supports
515  // an undocumented feature of Matlab.
517  { return m_rep->xnumel (idx); }
518 
519  // FIXME: Do we really need all these different versions of subsref
520  // and related functions?
521 
522  OCTINTERP_API octave_value
523  single_subsref (const std::string& type, const octave_value_list& idx);
524 
525  octave_value subsref (const std::string& type,
526  const std::list<octave_value_list>& idx)
527  { return m_rep->subsref (type, idx); }
528 
529  octave_value subsref (const std::string& type,
530  const std::list<octave_value_list>& idx,
531  bool auto_add)
532  { return m_rep->subsref (type, idx, auto_add); }
533 
534  OCTINTERP_API octave_value_list
535  subsref (const std::string& type, const std::list<octave_value_list>& idx,
536  int nargout);
537 
538  OCTINTERP_API octave_value
539  next_subsref (const std::string& type,
540  const std::list<octave_value_list>& idx, std::size_t skip = 1);
541 
542  OCTINTERP_API octave_value_list
543  next_subsref (int nargout, const std::string& type,
544  const std::list<octave_value_list>& idx, std::size_t skip = 1);
545 
546  OCTINTERP_API octave_value
547  next_subsref (bool auto_add, const std::string& type,
548  const std::list<octave_value_list>& idx, std::size_t skip = 1);
549 
550  octave_value index_op (const octave_value_list& idx, bool resize_ok = false)
551  {
552  return m_rep->do_index_op (idx, resize_ok);
553  }
554 
555 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
556  OCTAVE_DEPRECATED (7, "use 'octave_value::index_op' instead")
557  octave_value do_index_op (const octave_value_list& idx,
558  bool resize_ok = false)
559  {
560  return index_op (idx, resize_ok);
561  }
562 #endif
563 
564  OCTINTERP_API octave_value
565  subsasgn (const std::string& type, const std::list<octave_value_list>& idx,
566  const octave_value& rhs);
567 
568  OCTINTERP_API octave_value
569  undef_subsasgn (const std::string& type,
570  const std::list<octave_value_list>& idx,
571  const octave_value& rhs);
572 
573  OCTINTERP_API octave_value&
574  assign (assign_op op, const std::string& type,
575  const std::list<octave_value_list>& idx, const octave_value& rhs);
576 
577  OCTINTERP_API octave_value& assign (assign_op, const octave_value& rhs);
578 
579  octave::idx_vector index_vector (bool require_integers = false) const
580  {
581  return m_rep->index_vector (require_integers);
582  }
583 
584  // Size.
585 
586  dim_vector dims (void) const { return m_rep->dims (); }
587 
588  OCTINTERP_API std::string get_dims_str (void) const;
589 
590  octave_idx_type rows (void) const { return m_rep->rows (); }
591 
592  octave_idx_type columns (void) const { return m_rep->columns (); }
593 
594  OCTINTERP_API octave_idx_type length (void) const;
595 
596  int ndims (void) const { return m_rep->ndims (); }
597 
598  bool all_zero_dims (void) const { return dims ().all_zero (); }
599 
600  // Are the dimensions of this constant zero by zero?
601  bool is_zero_by_zero (void) const
602  { return (ndims () == 2 && rows () == 0 && columns () == 0); }
603 
604  octave_idx_type numel (void) const
605  { return m_rep->numel (); }
606 
607  std::size_t byte_size (void) const
608  { return m_rep->byte_size (); }
609 
610  octave_idx_type nnz (void) const { return m_rep->nnz (); }
611 
612  octave_idx_type nzmax (void) const { return m_rep->nzmax (); }
613 
614  octave_idx_type nfields (void) const { return m_rep->nfields (); }
615 
616  octave_value reshape (const dim_vector& dv) const
617  { return m_rep->reshape (dv); }
618 
619  octave_value permute (const Array<int>& vec, bool inv = false) const
620  { return m_rep->permute (vec, inv); }
621 
622  octave_value ipermute (const Array<int>& vec) const
623  { return m_rep->permute (vec, true); }
624 
625  octave_value resize (const dim_vector& dv, bool fill = false) const
626  { return m_rep->resize (dv, fill);}
627 
628  MatrixType matrix_type (void) const
629  { return m_rep->matrix_type (); }
630 
631  MatrixType matrix_type (const MatrixType& typ) const
632  { return m_rep->matrix_type (typ); }
633 
634  // Does this constant have a type? Both of these are provided since it is
635  // sometimes more natural to write is_undefined() instead of ! is_defined().
636 
637  bool is_defined (void) const
638  { return m_rep->is_defined (); }
639 
640  bool is_undefined (void) const
641  { return ! is_defined (); }
642 
643  bool is_legacy_object (void) const
644  { return m_rep->is_legacy_object (); }
645 
646  bool isempty (void) const
647  { return m_rep->isempty (); }
648 
649  bool iscell (void) const
650  { return m_rep->iscell (); }
651 
652  bool iscellstr (void) const
653  { return m_rep->iscellstr (); }
654 
655  bool is_real_scalar (void) const
656  { return m_rep->is_real_scalar (); }
657 
658  bool is_real_matrix (void) const
659  { return m_rep->is_real_matrix (); }
660 
661  bool is_complex_scalar (void) const
662  { return m_rep->is_complex_scalar (); }
663 
664  bool is_complex_matrix (void) const
665  { return m_rep->is_complex_matrix (); }
666 
667  bool is_bool_scalar (void) const
668  { return m_rep->is_bool_scalar (); }
669 
670  bool is_bool_matrix (void) const
671  { return m_rep->is_bool_matrix (); }
672 
673  bool is_char_matrix (void) const
674  { return m_rep->is_char_matrix (); }
675 
676  bool is_diag_matrix (void) const
677  { return m_rep->is_diag_matrix (); }
678 
679  bool is_perm_matrix (void) const
680  { return m_rep->is_perm_matrix (); }
681 
682  bool is_string (void) const
683  { return m_rep->is_string (); }
684 
685  bool is_sq_string (void) const
686  { return m_rep->is_sq_string (); }
687 
688  bool is_dq_string (void) const
689  { return m_rep->is_string () && ! m_rep->is_sq_string (); }
690 
691  bool is_range (void) const
692  { return m_rep->is_range (); }
693 
694  bool isstruct (void) const
695  { return m_rep->isstruct (); }
696 
697  bool is_classdef_meta (void) const
698  { return m_rep->is_classdef_meta (); }
699 
700  bool is_classdef_object (void) const
701  { return m_rep->is_classdef_object (); }
702 
703  bool is_classdef_superclass_ref (void) const
704  { return m_rep->is_classdef_superclass_ref (); }
705 
706  bool is_package (void) const
707  { return m_rep->is_package (); }
708 
709  bool isobject (void) const
710  { return m_rep->isobject (); }
711 
712  bool isjava (void) const
713  { return m_rep->isjava (); }
714 
715  bool is_cs_list (void) const
716  { return m_rep->is_cs_list (); }
717 
718  bool is_magic_colon (void) const
719  { return m_rep->is_magic_colon (); }
720 
721  bool is_magic_int (void) const
722  { return m_rep->is_magic_int (); }
723 
724  bool isnull (void) const
725  { return m_rep->isnull (); }
726 
727  // Are any or all of the elements in this constant nonzero?
728 
729  octave_value all (int dim = 0) const
730  { return m_rep->all (dim); }
731 
732  octave_value any (int dim = 0) const
733  { return m_rep->any (dim); }
734 
736  { return m_rep->builtin_type (); }
737 
738  // Floating point types.
739 
740  bool is_double_type (void) const
741  { return m_rep->is_double_type (); }
742 
743  bool is_single_type (void) const
744  { return m_rep->is_single_type (); }
745 
746  bool isfloat (void) const
747  { return m_rep->isfloat (); }
748 
749  // Integer types.
750 
751  bool is_int8_type (void) const
752  { return m_rep->is_int8_type (); }
753 
754  bool is_int16_type (void) const
755  { return m_rep->is_int16_type (); }
756 
757  bool is_int32_type (void) const
758  { return m_rep->is_int32_type (); }
759 
760  bool is_int64_type (void) const
761  { return m_rep->is_int64_type (); }
762 
763  bool is_uint8_type (void) const
764  { return m_rep->is_uint8_type (); }
765 
766  bool is_uint16_type (void) const
767  { return m_rep->is_uint16_type (); }
768 
769  bool is_uint32_type (void) const
770  { return m_rep->is_uint32_type (); }
771 
772  bool is_uint64_type (void) const
773  { return m_rep->is_uint64_type (); }
774 
775  bool isinteger (void) const
776  { return m_rep->isinteger (); }
777 
778  // Other type stuff.
779 
780  bool islogical (void) const
781  { return m_rep->islogical (); }
782 
783  bool isreal (void) const
784  { return m_rep->isreal (); }
785 
786  bool iscomplex (void) const
787  { return m_rep->iscomplex (); }
788 
789  bool is_scalar_type (void) const
790  { return m_rep->is_scalar_type (); }
791 
792  bool is_matrix_type (void) const
793  { return m_rep->is_matrix_type (); }
794 
795  bool isnumeric (void) const
796  { return m_rep->isnumeric (); }
797 
798  bool issparse (void) const
799  { return m_rep->issparse (); }
800 
801  // Does this constant correspond to a truth value?
802 
803  bool is_true (void) const
804  { return m_rep->is_true (); }
805 
806  // Do two constants match (in a switch statement)?
807 
808  bool is_equal (const octave_value&) const;
809 
810  bool is_constant (void) const
811  { return m_rep->is_constant (); }
812 
813  bool is_function_handle (void) const
814  { return m_rep->is_function_handle (); }
815 
816  bool is_anonymous_function (void) const
817  { return m_rep->is_anonymous_function (); }
818 
819  bool is_inline_function (void) const
820  { return m_rep->is_inline_function (); }
821 
822  bool is_function (void) const
823  { return m_rep->is_function (); }
824 
825  bool is_user_script (void) const
826  { return m_rep->is_user_script (); }
827 
828  bool is_user_function (void) const
829  { return m_rep->is_user_function (); }
830 
831  bool is_user_code (void) const
832  { return m_rep->is_user_code (); }
833 
834  bool is_builtin_function (void) const
835  { return m_rep->is_builtin_function (); }
836 
837  bool is_dld_function (void) const
838  { return m_rep->is_dld_function (); }
839 
840  bool is_mex_function (void) const
841  { return m_rep->is_mex_function (); }
842 
843  void erase_subfunctions (void) { m_rep->erase_subfunctions (); }
844 
845  // Values.
846 
847  octave_value eval (void) { return *this; }
848 
849  short int
850  short_value (bool req_int = false, bool frc_str_conv = false) const
851  { return m_rep->short_value (req_int, frc_str_conv); }
852 
853  unsigned short int
854  ushort_value (bool req_int = false, bool frc_str_conv = false) const
855  { return m_rep->ushort_value (req_int, frc_str_conv); }
856 
857  int int_value (bool req_int = false, bool frc_str_conv = false) const
858  { return m_rep->int_value (req_int, frc_str_conv); }
859 
860  unsigned int
861  uint_value (bool req_int = false, bool frc_str_conv = false) const
862  { return m_rep->uint_value (req_int, frc_str_conv); }
863 
864  int nint_value (bool frc_str_conv = false) const
865  { return m_rep->nint_value (frc_str_conv); }
866 
867  long int
868  long_value (bool req_int = false, bool frc_str_conv = false) const
869  { return m_rep->long_value (req_int, frc_str_conv); }
870 
871  unsigned long int
872  ulong_value (bool req_int = false, bool frc_str_conv = false) const
873  { return m_rep->ulong_value (req_int, frc_str_conv); }
874 
875  int64_t
876  int64_value (bool req_int = false, bool frc_str_conv = false) const
877  { return m_rep->int64_value (req_int, frc_str_conv); }
878 
879  uint64_t
880  uint64_value (bool req_int = false, bool frc_str_conv = false) const
881  { return m_rep->uint64_value (req_int, frc_str_conv); }
882 
884  idx_type_value (bool req_int = false, bool frc_str_conv = false) const;
885 
886  double double_value (bool frc_str_conv = false) const
887  { return m_rep->double_value (frc_str_conv); }
888 
889  float float_value (bool frc_str_conv = false) const
890  { return m_rep->float_value (frc_str_conv); }
891 
892  double scalar_value (bool frc_str_conv = false) const
893  { return m_rep->scalar_value (frc_str_conv); }
894 
895  float float_scalar_value (bool frc_str_conv = false) const
896  { return m_rep->float_scalar_value (frc_str_conv); }
897 
898  Matrix matrix_value (bool frc_str_conv = false) const
899  { return m_rep->matrix_value (frc_str_conv); }
900 
901  FloatMatrix float_matrix_value (bool frc_str_conv = false) const
902  { return m_rep->float_matrix_value (frc_str_conv); }
903 
904  NDArray array_value (bool frc_str_conv = false) const
905  { return m_rep->array_value (frc_str_conv); }
906 
907  FloatNDArray float_array_value (bool frc_str_conv = false) const
908  { return m_rep->float_array_value (frc_str_conv); }
909 
910  Complex complex_value (bool frc_str_conv = false) const
911  { return m_rep->complex_value (frc_str_conv); }
912 
913  FloatComplex float_complex_value (bool frc_str_conv = false) const
914  { return m_rep->float_complex_value (frc_str_conv); }
915 
916  ComplexMatrix complex_matrix_value (bool frc_str_conv = false) const
917  { return m_rep->complex_matrix_value (frc_str_conv); }
918 
920  float_complex_matrix_value (bool frc_str_conv = false) const
921  { return m_rep->float_complex_matrix_value (frc_str_conv); }
922 
923  ComplexNDArray complex_array_value (bool frc_str_conv = false) const
924  { return m_rep->complex_array_value (frc_str_conv); }
925 
927  float_complex_array_value (bool frc_str_conv = false) const
928  { return m_rep->float_complex_array_value (frc_str_conv); }
929 
930  bool bool_value (bool warn = false) const
931  { return m_rep->bool_value (warn); }
932 
933  boolMatrix bool_matrix_value (bool warn = false) const
934  { return m_rep->bool_matrix_value (warn); }
935 
936  boolNDArray bool_array_value (bool warn = false) const
937  { return m_rep->bool_array_value (warn); }
938 
939  charMatrix char_matrix_value (bool frc_str_conv = false) const
940  { return m_rep->char_matrix_value (frc_str_conv); }
941 
942  charNDArray char_array_value (bool frc_str_conv = false) const
943  { return m_rep->char_array_value (frc_str_conv); }
944 
945  SparseMatrix sparse_matrix_value (bool frc_str_conv = false) const
946  { return m_rep->sparse_matrix_value (frc_str_conv); }
947 
949  sparse_complex_matrix_value (bool frc_str_conv = false) const
950  { return m_rep->sparse_complex_matrix_value (frc_str_conv); }
951 
952  SparseBoolMatrix sparse_bool_matrix_value (bool warn = false) const
953  { return m_rep->sparse_bool_matrix_value (warn); }
954 
955  DiagMatrix diag_matrix_value (bool force = false) const
956  { return m_rep->diag_matrix_value (force); }
957 
958  FloatDiagMatrix float_diag_matrix_value (bool force = false) const
959  { return m_rep->float_diag_matrix_value (force); }
960 
961  ComplexDiagMatrix complex_diag_matrix_value (bool force = false) const
962  { return m_rep->complex_diag_matrix_value (force); }
963 
965  float_complex_diag_matrix_value (bool force = false) const
966  { return m_rep->float_complex_diag_matrix_value (force); }
967 
969  { return m_rep->perm_matrix_value (); }
970 
972  { return m_rep->int8_scalar_value (); }
973 
975  { return m_rep->int16_scalar_value (); }
976 
978  { return m_rep->int32_scalar_value (); }
979 
981  { return m_rep->int64_scalar_value (); }
982 
984  { return m_rep->uint8_scalar_value (); }
985 
987  { return m_rep->uint16_scalar_value (); }
988 
990  { return m_rep->uint32_scalar_value (); }
991 
993  { return m_rep->uint64_scalar_value (); }
994 
996  { return m_rep->int8_array_value (); }
997 
999  { return m_rep->int16_array_value (); }
1000 
1002  { return m_rep->int32_array_value (); }
1003 
1005  { return m_rep->int64_array_value (); }
1006 
1008  { return m_rep->uint8_array_value (); }
1009 
1011  { return m_rep->uint16_array_value (); }
1012 
1014  { return m_rep->uint32_array_value (); }
1015 
1017  { return m_rep->uint64_array_value (); }
1018 
1019  std::string string_value (bool force = false) const
1020  { return m_rep->string_value (force); }
1021 
1022  string_vector string_vector_value (bool pad = false) const
1023  { return m_rep->string_vector_value (pad); }
1024 
1025  Cell cell_value (void) const;
1026 
1028  { return m_rep->cellstr_value (); }
1029 
1030  octave::range<double> range_value (void) const
1031  { return m_rep->range_value (); }
1032 
1033  // For now, disable all but range<double>.
1034 
1035 #if 0
1036 
1037  octave::range<float> float_range_value (void) const
1038  { return m_rep->float_range_value (); }
1039 
1040  octave::range<octave_int8> int8_range_value (void) const
1041  { return m_rep->int8_range_value (); }
1042 
1043  octave::range<octave_int16> int16_range_value (void) const
1044  { return m_rep->int16_range_value (); }
1045 
1046  octave::range<octave_int32> int32_range_value (void) const
1047  { return m_rep->int32_range_value (); }
1048 
1049  octave::range<octave_int64> int64_range_value (void) const
1050  { return m_rep->int64_range_value (); }
1051 
1052  octave::range<octave_uint8> uint8_range_value (void) const
1053  { return m_rep->uint8_range_value (); }
1054 
1055  octave::range<octave_uint16> uint16_range_value (void) const
1056  { return m_rep->uint16_range_value (); }
1057 
1058  octave::range<octave_uint32> uint32_range_value (void) const
1059  { return m_rep->uint32_range_value (); }
1060 
1061  octave::range<octave_uint64> uint64_range_value (void) const
1062  { return m_rep->uint64_range_value (); }
1063 
1064 #endif
1065 
1066  OCTINTERP_API octave_map map_value (void) const;
1067 
1068  OCTINTERP_API octave_scalar_map scalar_map_value (void) const;
1069 
1071  { return m_rep->map_keys (); }
1072 
1073  bool isfield (const std::string& field_name) const
1074  { return m_rep->isfield (field_name); }
1075 
1076  std::size_t nparents (void) const
1077  { return m_rep->nparents (); }
1078 
1079  std::list<std::string> parent_class_name_list (void) const
1080  { return m_rep->parent_class_name_list (); }
1081 
1083  { return m_rep->parent_class_names (); }
1084 
1086  find_parent_class (const std::string& parent_class_name)
1087  { return m_rep->find_parent_class (parent_class_name); }
1088 
1089  bool is_instance_of (const std::string& cls_name) const
1090  { return m_rep->is_instance_of (cls_name); }
1091 
1092  OCTINTERP_API octave_classdef *
1093  classdef_object_value (bool silent = false) const;
1094 
1095  OCTINTERP_API octave_function *
1096  function_value (bool silent = false) const;
1097 
1098  OCTINTERP_API octave_user_function *
1099  user_function_value (bool silent = false) const;
1100 
1101  OCTINTERP_API octave_user_script *
1102  user_script_value (bool silent = false) const;
1103 
1104  OCTINTERP_API octave_user_code * user_code_value (bool silent = false) const;
1105 
1106  OCTINTERP_API octave_fcn_handle *
1107  fcn_handle_value (bool silent = false) const;
1108 
1109  OCTINTERP_API octave_value_list list_value (void) const;
1110 
1111  OCTINTERP_API ColumnVector
1112  column_vector_value (bool frc_str_conv = false,
1113  bool frc_vec_conv = false) const;
1114 
1115  OCTINTERP_API ComplexColumnVector
1116  complex_column_vector_value (bool frc_str_conv = false,
1117  bool frc_vec_conv = false) const;
1118 
1119  OCTINTERP_API RowVector
1120  row_vector_value (bool frc_str_conv = false,
1121  bool frc_vec_conv = false) const;
1122 
1123  OCTINTERP_API ComplexRowVector
1124  complex_row_vector_value (bool frc_str_conv = false,
1125  bool frc_vec_conv = false) const;
1126 
1127  OCTINTERP_API FloatColumnVector
1128  float_column_vector_value (bool frc_str_conv = false,
1129  bool frc_vec_conv = false) const;
1130 
1131  OCTINTERP_API FloatComplexColumnVector
1132  float_complex_column_vector_value (bool frc_str_conv = false,
1133  bool frc_vec_conv = false) const;
1134 
1135  OCTINTERP_API FloatRowVector
1136  float_row_vector_value (bool frc_str_conv = false,
1137  bool frc_vec_conv = false) const;
1138 
1139  OCTINTERP_API FloatComplexRowVector
1140  float_complex_row_vector_value (bool frc_str_conv = false,
1141  bool frc_vec_conv = false) const;
1142 
1143  OCTINTERP_API Array<int>
1144  int_vector_value (bool req_int = false,
1145  bool frc_str_conv = false,
1146  bool frc_vec_conv = false) const;
1147 
1148  OCTINTERP_API Array<octave_idx_type>
1149  octave_idx_type_vector_value (bool req_int = false,
1150  bool frc_str_conv = false,
1151  bool frc_vec_conv = false) const;
1152 
1153  OCTINTERP_API Array<double>
1154  vector_value (bool frc_str_conv = false,
1155  bool frc_vec_conv = false) const;
1156 
1157  OCTINTERP_API Array<Complex>
1158  complex_vector_value (bool frc_str_conv = false,
1159  bool frc_vec_conv = false) const;
1160 
1161  OCTINTERP_API Array<float>
1162  float_vector_value (bool frc_str_conv = false,
1163  bool frc_vec_conv = false) const;
1164 
1165  OCTINTERP_API Array<FloatComplex>
1166  float_complex_vector_value (bool frc_str_conv = false,
1167  bool frc_vec_conv = false) const;
1168 
1169  // Extract values of specific types without any implicit type conversions.
1170  // Throw an error if an object is the wrong type for the requested value
1171  // extraction.
1172  //
1173  // These functions are intended to provide a simple way to extract values of
1174  // specific types and display error messages that are more meaningful than
1175  // the generic "error: wrong type argument 'cell'" message.
1176 
1177  OCTINTERP_API short int xshort_value (const char *fmt, ...) const;
1178 
1179  OCTINTERP_API unsigned short int xushort_value (const char *fmt, ...) const;
1180 
1181  OCTINTERP_API int xint_value (const char *fmt, ...) const;
1182 
1183  OCTINTERP_API unsigned int xuint_value (const char *fmt, ...) const;
1184 
1185  OCTINTERP_API int xnint_value (const char *fmt, ...) const;
1186 
1187  OCTINTERP_API long int xlong_value (const char *fmt, ...) const;
1188 
1189  OCTINTERP_API unsigned long int xulong_value (const char *fmt, ...) const;
1190 
1191  OCTINTERP_API int64_t xint64_value (const char *fmt, ...) const;
1192 
1193  OCTINTERP_API uint64_t xuint64_value (const char *fmt, ...) const;
1194 
1195  OCTINTERP_API octave_idx_type xidx_type_value (const char *fmt, ...) const;
1196 
1197  OCTINTERP_API double xdouble_value (const char *fmt, ...) const;
1198 
1199  OCTINTERP_API float xfloat_value (const char *fmt, ...) const;
1200 
1201  OCTINTERP_API double xscalar_value (const char *fmt, ...) const;
1202 
1203  OCTINTERP_API float xfloat_scalar_value (const char *fmt, ...) const;
1204 
1205  OCTINTERP_API Matrix xmatrix_value (const char *fmt, ...) const;
1206 
1207  OCTINTERP_API FloatMatrix xfloat_matrix_value (const char *fmt, ...) const;
1208 
1209  OCTINTERP_API NDArray xarray_value (const char *fmt, ...) const;
1210 
1211  OCTINTERP_API FloatNDArray xfloat_array_value (const char *fmt, ...) const;
1212 
1213  OCTINTERP_API Complex xcomplex_value (const char *fmt, ...) const;
1214 
1215  OCTINTERP_API FloatComplex xfloat_complex_value (const char *fmt, ...) const;
1216 
1217  OCTINTERP_API ComplexMatrix
1218  xcomplex_matrix_value (const char *fmt, ...) const;
1219 
1220  OCTINTERP_API FloatComplexMatrix
1221  xfloat_complex_matrix_value (const char *fmt, ...) const;
1222 
1223  OCTINTERP_API ComplexNDArray
1224  xcomplex_array_value (const char *fmt, ...) const;
1225 
1226  OCTINTERP_API FloatComplexNDArray
1227  xfloat_complex_array_value (const char *fmt, ...) const;
1228 
1229  OCTINTERP_API bool xbool_value (const char *fmt, ...) const;
1230 
1231  OCTINTERP_API boolMatrix xbool_matrix_value (const char *fmt, ...) const;
1232 
1233  OCTINTERP_API boolNDArray xbool_array_value (const char *fmt, ...) const;
1234 
1235  OCTINTERP_API charMatrix xchar_matrix_value (const char *fmt, ...) const;
1236 
1237  OCTINTERP_API charNDArray xchar_array_value (const char *fmt, ...) const;
1238 
1239  OCTINTERP_API SparseMatrix xsparse_matrix_value (const char *fmt, ...) const;
1240 
1241  OCTINTERP_API SparseComplexMatrix
1242  xsparse_complex_matrix_value (const char *fmt, ...) const;
1243 
1244  OCTINTERP_API SparseBoolMatrix
1245  xsparse_bool_matrix_value (const char *fmt, ...) const;
1246 
1247  OCTINTERP_API DiagMatrix xdiag_matrix_value (const char *fmt, ...) const;
1248 
1249  OCTINTERP_API FloatDiagMatrix
1250  xfloat_diag_matrix_value (const char *fmt, ...) const;
1251 
1252  OCTINTERP_API ComplexDiagMatrix
1253  xcomplex_diag_matrix_value (const char *fmt, ...) const;
1254 
1255  OCTINTERP_API FloatComplexDiagMatrix
1256  xfloat_complex_diag_matrix_value (const char *fmt, ...) const;
1257 
1258  OCTINTERP_API PermMatrix xperm_matrix_value (const char *fmt, ...) const;
1259 
1260  OCTINTERP_API octave_int8 xint8_scalar_value (const char *fmt, ...) const;
1261 
1262  OCTINTERP_API octave_int16 xint16_scalar_value (const char *fmt, ...) const;
1263 
1264  OCTINTERP_API octave_int32 xint32_scalar_value (const char *fmt, ...) const;
1265 
1266  OCTINTERP_API octave_int64 xint64_scalar_value (const char *fmt, ...) const;
1267 
1268  OCTINTERP_API octave_uint8 xuint8_scalar_value (const char *fmt, ...) const;
1269 
1270  OCTINTERP_API octave_uint16 xuint16_scalar_value (const char *fmt, ...) const;
1271 
1272  OCTINTERP_API octave_uint32 xuint32_scalar_value (const char *fmt, ...) const;
1273 
1274  OCTINTERP_API octave_uint64 xuint64_scalar_value (const char *fmt, ...) const;
1275 
1276  OCTINTERP_API int8NDArray xint8_array_value (const char *fmt, ...) const;
1277 
1278  OCTINTERP_API int16NDArray xint16_array_value (const char *fmt, ...) const;
1279 
1280  OCTINTERP_API int32NDArray xint32_array_value (const char *fmt, ...) const;
1281 
1282  OCTINTERP_API int64NDArray xint64_array_value (const char *fmt, ...) const;
1283 
1284  OCTINTERP_API uint8NDArray xuint8_array_value (const char *fmt, ...) const;
1285 
1286  OCTINTERP_API uint16NDArray xuint16_array_value (const char *fmt, ...) const;
1287 
1288  OCTINTERP_API uint32NDArray xuint32_array_value (const char *fmt, ...) const;
1289 
1290  OCTINTERP_API uint64NDArray xuint64_array_value (const char *fmt, ...) const;
1291 
1292  OCTINTERP_API std::string xstring_value (const char *fmt, ...) const;
1293 
1294  OCTINTERP_API string_vector xstring_vector_value (const char *fmt, ...) const;
1295 
1296  OCTINTERP_API Cell xcell_value (const char *fmt, ...) const;
1297 
1298  OCTINTERP_API Array<std::string> xcellstr_value (const char *fmt, ...) const;
1299 
1300  OCTINTERP_API octave::range<double>
1301  xrange_value (const char *fmt, ...) const;
1302 
1303  // For now, disable all but range<double>.
1304 
1305 #if 0
1306 
1307  OCTINTERP_API octave::range<float>
1308  xfloat_range_value (const char *fmt, ...) const;
1309 
1310  OCTINTERP_API octave::range<octave_int8>
1311  xint8_range_value (const char *fmt, ...) const;
1312 
1313  OCTINTERP_API octave::range<octave_int16>
1314  xint16_range_value (const char *fmt, ...) const;
1315 
1316  OCTINTERP_API octave::range<octave_int32>
1317  xint32_range_value (const char *fmt, ...) const;
1318 
1319  OCTINTERP_API octave::range<octave_int64>
1320  xint64_range_value (const char *fmt, ...) const;
1321 
1322  OCTINTERP_API octave::range<octave_uint8>
1323  xuint8_range_value (const char *fmt, ...) const;
1324 
1325  OCTINTERP_API octave::range<octave_uint16>
1326  xuint16_range_value (const char *fmt, ...) const;
1327 
1328  OCTINTERP_API octave::range<octave_uint32>
1329  xuint32_range_value (const char *fmt, ...) const;
1330 
1331  OCTINTERP_API octave::range<octave_uint64>
1332  xuint64_range_value (const char *fmt, ...) const;
1333 
1334 #endif
1335 
1336  OCTINTERP_API octave_map xmap_value (const char *fmt, ...) const;
1337 
1338  OCTINTERP_API octave_scalar_map
1339  xscalar_map_value (const char *fmt, ...) const;
1340 
1341  OCTINTERP_API ColumnVector xcolumn_vector_value (const char *fmt, ...) const;
1342 
1343  OCTINTERP_API ComplexColumnVector
1344  xcomplex_column_vector_value (const char *fmt, ...) const;
1345 
1346  OCTINTERP_API RowVector xrow_vector_value (const char *fmt, ...) const;
1347 
1348  OCTINTERP_API ComplexRowVector
1349  xcomplex_row_vector_value (const char *fmt, ...) const;
1350 
1351  OCTINTERP_API FloatColumnVector
1352  xfloat_column_vector_value (const char *fmt, ...) const;
1353 
1354  OCTINTERP_API FloatComplexColumnVector
1355  xfloat_complex_column_vector_value (const char *fmt, ...) const;
1356 
1357  OCTINTERP_API FloatRowVector
1358  xfloat_row_vector_value (const char *fmt, ...) const;
1359 
1360  OCTINTERP_API FloatComplexRowVector
1361  xfloat_complex_row_vector_value (const char *fmt, ...) const;
1362 
1363  OCTINTERP_API Array<int> xint_vector_value (const char *fmt, ...) const;
1364 
1365  OCTINTERP_API Array<octave_idx_type>
1366  xoctave_idx_type_vector_value (const char *fmt, ...) const;
1367 
1368  OCTINTERP_API Array<double> xvector_value (const char *fmt, ...) const;
1369 
1370  OCTINTERP_API Array<Complex>
1371  xcomplex_vector_value (const char *fmt, ...) const;
1372 
1373  OCTINTERP_API Array<float> xfloat_vector_value (const char *fmt, ...) const;
1374 
1375  OCTINTERP_API Array<FloatComplex>
1376  xfloat_complex_vector_value (const char *fmt, ...) const;
1377 
1378  OCTINTERP_API octave_function * xfunction_value (const char *fmt, ...) const;
1379 
1380  OCTINTERP_API octave_user_function *
1381  xuser_function_value (const char *fmt, ...) const;
1382 
1383  OCTINTERP_API octave_user_script *
1384  xuser_script_value (const char *fmt, ...) const;
1385 
1386  OCTINTERP_API octave_user_code *
1387  xuser_code_value (const char *fmt, ...) const;
1388 
1389  OCTINTERP_API octave_fcn_handle *
1390  xfcn_handle_value (const char *fmt, ...) const;
1391 
1392  OCTINTERP_API octave_value_list xlist_value (const char *fmt, ...) const;
1393 
1394  // Possibly economize a lazy-indexed value.
1395 
1396  void maybe_economize (void)
1397  { m_rep->maybe_economize (); }
1398 
1399  // The following two hook conversions are called on any octave_value prior to
1400  // storing it to a "permanent" location, like a named variable, a cell or a
1401  // struct component, or a return value of a function.
1402 
1403  OCTINTERP_API octave_value storable_value (void) const;
1404 
1405  // Ditto, but in place, i.e., equivalent to *this = this->storable_value (),
1406  // but possibly more efficient.
1407 
1408  OCTINTERP_API void make_storable_value (void);
1409 
1410  // FIXME: These should probably be private.
1411  // Conversions. If a user of this class wants a certain kind of constant,
1412  // he should simply ask for it, and we should convert it if possible.
1413 
1414  octave_value convert_to_str (bool pad = false, bool force = false,
1415  char type = '\'') const
1416  { return m_rep->convert_to_str (pad, force, type); }
1417 
1418  octave_value
1419  convert_to_str_internal (bool pad, bool force, char type) const
1420  { return m_rep->convert_to_str_internal (pad, force, type); }
1421 
1423  { m_rep->convert_to_row_or_column_vector (); }
1424 
1425  bool print_as_scalar (void) const
1426  { return m_rep->print_as_scalar (); }
1427 
1428  void print (std::ostream& os, bool pr_as_read_syntax = false)
1429  { m_rep->print (os, pr_as_read_syntax); }
1430 
1431  void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const
1432  { m_rep->print_raw (os, pr_as_read_syntax); }
1433 
1434  bool print_name_tag (std::ostream& os, const std::string& name) const
1435  { return m_rep->print_name_tag (os, name); }
1436 
1437  void print_with_name (std::ostream& os, const std::string& name) const
1438  { m_rep->print_with_name (os, name, true); }
1439 
1440  void short_disp (std::ostream& os) const { m_rep->short_disp (os); }
1441 
1442  OCTINTERP_API float_display_format get_edit_display_format (void) const;
1443 
1444  std::string edit_display (const float_display_format& fmt,
1445  octave_idx_type i, octave_idx_type j) const
1446  {
1447  return m_rep->edit_display (fmt, i, j);
1448  }
1449 
1450  int type_id (void) const { return m_rep->type_id (); }
1451 
1452  std::string type_name (void) const { return m_rep->type_name (); }
1453 
1454  std::string class_name (void) const { return m_rep->class_name (); }
1455 
1456  // Unary operations that are member functions. There are also some
1457  // non-member functions for unary and binary operations declared
1458  // below, outside of the octave_value class declaration.
1459 
1461 
1462 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
1463  OCTAVE_DEPRECATED (7, "use 'octave_value::non_const_unary_op' instead")
1464  octave_value& do_non_const_unary_op (unary_op op)
1465  {
1466  return non_const_unary_op (op);
1467  }
1468 #endif
1469 
1470  OCTINTERP_API octave_value&
1471  non_const_unary_op (unary_op op, const std::string& type,
1472  const std::list<octave_value_list>& idx);
1473 
1474 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
1475  OCTAVE_DEPRECATED (7, "use 'octave_value::non_const_unary_op' instead")
1476  octave_value& do_non_const_unary_op (unary_op op, const std::string& type,
1477  const std::list<octave_value_list>& idx)
1478  {
1479  return non_const_unary_op (op, type, idx);
1480  }
1481 #endif
1482 
1483  const octave_base_value& get_rep (void) const { return *m_rep; }
1484 
1485  bool is_copy_of (const octave_value& val) const { return m_rep == val.m_rep; }
1486 
1487  OCTINTERP_API void
1488  print_info (std::ostream& os, const std::string& prefix = "") const;
1489 
1490  bool save_ascii (std::ostream& os) { return m_rep->save_ascii (os); }
1491 
1492  OCTINTERP_API bool load_ascii (std::istream& is);
1493 
1494  bool save_binary (std::ostream& os, bool save_as_floats)
1495  { return m_rep->save_binary (os, save_as_floats); }
1496 
1497  OCTINTERP_API bool load_binary (std::istream& is, bool swap,
1499 
1500  bool save_hdf5 (octave_hdf5_id loc_id, const char *name,
1501  bool save_as_floats)
1502  { return m_rep->save_hdf5 (loc_id, name, save_as_floats); }
1503 
1504  OCTINTERP_API bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
1505 
1506  OCTINTERP_API int
1507  write (octave::stream& os, int block_size,
1508  oct_data_conv::data_type output_type, int skip,
1509  octave::mach_info::float_format flt_fmt) const;
1510 
1511  octave_base_value * internal_rep (void) const { return m_rep; }
1512 
1513  // These functions exist to support the MEX interface.
1514  // You should not use them anywhere else.
1515 
1516  OCTINTERP_API const void *
1517  mex_get_data (mxClassID class_id = mxUNKNOWN_CLASS,
1518  mxComplexity complexity = mxREAL) const;
1519 
1520  const octave_idx_type * mex_get_ir (void) const
1521  {
1522  return m_rep->mex_get_ir ();
1523  }
1524 
1525  const octave_idx_type *
1526  mex_get_jc (void) const
1527  {
1528  return m_rep->mex_get_jc ();
1529  }
1530 
1531  mxArray * as_mxArray (bool interleaved = false) const
1532  { return m_rep->as_mxArray (interleaved); }
1533 
1535  { return m_rep->diag (k); }
1536 
1538  { return m_rep->diag (m, n); }
1539 
1541  { return m_rep->sort (dim, mode); }
1543  sortmode mode = ASCENDING) const
1544  { return m_rep->sort (sidx, dim, mode); }
1545 
1547  { return m_rep->issorted (mode); }
1548 
1550  { return m_rep->sort_rows_idx (mode); }
1551 
1553  { return m_rep->is_sorted_rows (mode); }
1554 
1555  void lock (void) { m_rep->lock (); }
1556 
1557  void unlock (void) { m_rep->unlock (); }
1558 
1559  bool islocked (void) const { return m_rep->islocked (); }
1560 
1561  void call_object_destructor (void) { return m_rep->call_object_destructor (); }
1562 
1563  octave_value dump (void) const { return m_rep->dump (); }
1564 
1565 #define MAPPER_FORWARD(F) \
1566  octave_value F (void) const \
1567  { \
1568  return m_rep->map (octave_base_value::umap_ ## F); \
1569  }
1570 
1616 
1617  // These functions are prefixed with X to avoid potential macro conflicts.
1618 
1619  MAPPER_FORWARD (xisalnum)
1620  MAPPER_FORWARD (xisalpha)
1622  MAPPER_FORWARD (xiscntrl)
1623  MAPPER_FORWARD (xisdigit)
1624  MAPPER_FORWARD (xisgraph)
1625  MAPPER_FORWARD (xislower)
1626  MAPPER_FORWARD (xisprint)
1627  MAPPER_FORWARD (xispunct)
1628  MAPPER_FORWARD (xisspace)
1629  MAPPER_FORWARD (xisupper)
1630  MAPPER_FORWARD (xisxdigit)
1631  MAPPER_FORWARD (xsignbit)
1632  MAPPER_FORWARD (xtolower)
1633  MAPPER_FORWARD (xtoupper)
1634 
1635 #undef MAPPER_FORWARD
1636 
1638  { return m_rep->map (umap); }
1639 
1640  //! Extract the n-th element, aka 'val(n)'.
1641  //!
1642  //! @return Result is undefined if 'val' is not an array type
1643  //! or @p n is out of range.
1644  //!
1645  //! @warning Function calls should never error.
1646 
1647  octave_value
1649  { return m_rep->fast_elem_extract (n); }
1650 
1651  //! Assign the n-th element, aka 'val(n) = x'.
1652  //!
1653  //! @returns false if 'val' is not an array type,
1654  //! @p x is not a matching scalar type,
1655  //! or @p n is out of range.
1656  //!
1657  //! @warning Function calls should never error.
1658 
1659  bool
1661  {
1662  make_unique ();
1663  return m_rep->fast_elem_insert (n, x);
1664  }
1665 
1666 protected:
1667 
1668  //! The real representation.
1670 
1671 private:
1672 
1673  static OCTINTERP_API octave_base_value * nil_rep (void);
1674 
1676 
1678 
1679  // This declaration protects against constructing octave_value from
1680  // const octave_base_value* which actually silently calls octave_value (bool).
1681  OCTINTERP_API octave_value (const octave_base_value *);
1682 
1683 };
1684 
1685 // Non-member unary and binary operations on octave_value objects.
1686 
1688 
1689 extern OCTINTERP_API octave_value
1691  const octave_value& a);
1692 
1693 extern OCTINTERP_API octave_value
1695 
1696 extern OCTINTERP_API octave_value
1698  const octave_value& a, const octave_value& b);
1699 
1700 extern OCTINTERP_API octave_value
1702  const octave_value& a, const octave_value& b);
1703 
1704 extern OCTINTERP_API octave_value
1706  const octave_value& b);
1707 
1708 extern OCTINTERP_API octave_value
1710  const octave_value& b);
1711 
1712 extern OCTINTERP_API octave_value
1714  const octave_value& b, const Array<octave_idx_type>& ra_idx);
1715 
1716 extern OCTINTERP_API octave_value
1717 cat_op (const octave_value& a, const octave_value& b,
1719 
1720 extern OCTINTERP_API octave_value
1721 colon_op (const octave_value& base, const octave_value& increment,
1722  const octave_value& limit, bool is_for_cmd_expr = false);
1723 
1724 inline octave_value
1725 colon_op (const octave_value& base, const octave_value& limit,
1726  bool is_for_cmd_expr = false)
1727 {
1728  // Note, we need to pass an undefined octave_value object instead of
1729  // octave_value (1.0) so that we can properly detect the
1730  // two-argument case and correctly pass just two arguments to any
1731  // user-defined function that is provided if either base or limit is
1732  // an object.
1733 
1734  return colon_op (base, octave_value (), limit, is_for_cmd_expr);
1735 }
1736 
1738 
1739 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
1740 OCTAVE_DEPRECATED (7, "use 'octave::unary_op' instead")
1741 inline octave_value
1742 do_unary_op (octave::type_info& ti, octave_value::unary_op op,
1743  const octave_value& a)
1744 {
1745  return octave::unary_op (ti, op, a);
1746 }
1747 
1748 OCTAVE_DEPRECATED (7, "use 'octave::unary_op' instead")
1749 inline octave_value
1750 do_unary_op (octave_value::unary_op op, const octave_value& a)
1751 {
1752  return octave::unary_op (op, a);
1753 }
1754 
1755 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1756 inline octave_value
1757 do_binary_op (octave::type_info& ti, octave_value::binary_op op,
1758  const octave_value& a, const octave_value& b)
1759 {
1760  return octave::binary_op (ti, op, a, b);
1761 }
1762 
1763 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1764 inline octave_value
1765 do_binary_op (octave::type_info& ti, octave_value::compound_binary_op op,
1766  const octave_value& a, const octave_value& b)
1767 {
1768  return octave::binary_op (ti, op, a, b);
1769 }
1770 
1771 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1772 inline octave_value
1773 do_binary_op (octave_value::binary_op op, const octave_value& a,
1774  const octave_value& b)
1775 {
1776  return octave::binary_op (op, a, b);
1777 }
1778 
1779 OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1780 inline octave_value
1781 do_binary_op (octave_value::compound_binary_op op, const octave_value& a,
1782  const octave_value& b)
1783 {
1784  return octave::binary_op (op, a, b);
1785 }
1786 
1787 OCTAVE_DEPRECATED (7, "use 'octave::cat_op' instead")
1788 inline octave_value
1789 do_cat_op (octave::type_info& ti, const octave_value& a,
1790  const octave_value& b, const Array<octave_idx_type>& ra_idx)
1791 {
1792  return octave::cat_op (ti, a, b, ra_idx);
1793 }
1794 
1795 OCTAVE_DEPRECATED (7, "use 'octave::cat_op' instead")
1796 inline octave_value
1797 do_cat_op (const octave_value& a, const octave_value& b,
1798  const Array<octave_idx_type>& ra_idx)
1799 {
1800  return octave::cat_op (a, b, ra_idx);
1801 }
1802 
1803 OCTAVE_DEPRECATED (7, "use 'octave::colon_op' instead")
1804 inline octave_value
1805 do_colon_op (const octave_value& base, const octave_value& increment,
1806  const octave_value& limit, bool is_for_cmd_expr = false)
1807 {
1808  return octave::colon_op (base, increment, limit, is_for_cmd_expr);
1809 }
1810 
1811 OCTAVE_DEPRECATED (7, "use 'octave::colon_op' instead")
1812 inline octave_value
1813 do_colon_op (const octave_value& base, const octave_value& limit,
1814  bool is_for_cmd_expr = false)
1815 {
1816  return octave::colon_op (base, limit, is_for_cmd_expr);
1817 }
1818 #endif
1819 
1820 #define OV_UNOP_FN(name) \
1821  inline octave_value \
1822  name (const octave_value& a) \
1823  { \
1824  return octave::unary_op (octave_value::name, a); \
1825  }
1826 
1827 #define OV_UNOP_OP(name, op) \
1828  inline octave_value \
1829  operator op (const octave_value& a) \
1830  { \
1831  return name (a); \
1832  }
1833 
1834 #define OV_UNOP_FN_OP(name, op) \
1835  OV_UNOP_FN (name) \
1836  OV_UNOP_OP (name, op)
1837 
1841 
1844 
1845 // No simple way to define these for prefix and suffix ops?
1846 //
1847 // incr
1848 // decr
1849 
1850 #define OV_BINOP_FN(name) \
1851  inline octave_value \
1852  name (const octave_value& a1, const octave_value& a2) \
1853  { \
1854  return octave::binary_op (octave_value::name, a1, a2); \
1855  }
1856 
1857 #define OV_BINOP_OP(name, op) \
1858  inline octave_value \
1859  operator op (const octave_value& a1, const octave_value& a2) \
1860  { \
1861  return name (a1, a2); \
1862  }
1863 
1864 #define OV_BINOP_FN_OP(name, op) \
1865  OV_BINOP_FN (name) \
1866  OV_BINOP_OP (name, op)
1867 
1872 
1875 
1882 
1889 
1891 
1892 #define OV_COMP_BINOP_FN(name) \
1893  inline octave_value \
1894  name (const octave_value& a1, const octave_value& a2) \
1895  { \
1896  return octave::binary_op (octave_value::name, a1, a2); \
1897  }
1898 
1903 
1904 extern OCTINTERP_API void install_types (octave::type_info&);
1905 
1906 // Templated value extractors.
1907 // FIXME: would be more consistent to use panic_impossible(), rather than
1908 // assert(), but including "error.h" leads to compilation errors.
1909 template <typename Value>
1910 inline Value octave_value_extract (const octave_value&)
1911 { assert (false); }
1912 
1913 #define DEF_VALUE_EXTRACTOR(VALUE,MPREFIX) \
1914  template <> \
1915  inline VALUE octave_value_extract<VALUE> (const octave_value& v) \
1916  { \
1917  return v.MPREFIX ## _value (); \
1918  }
1919 
1921 DEF_VALUE_EXTRACTOR (float, float_scalar)
1925 
1934 
1940 
1950 
1956 
1960 DEF_VALUE_EXTRACTOR (FloatComplexColumnVector, float_complex_column_vector)
1961 
1965 DEF_VALUE_EXTRACTOR (FloatComplexRowVector, float_complex_row_vector)
1966 
1970 DEF_VALUE_EXTRACTOR (FloatComplexDiagMatrix, float_complex_diag_matrix)
1972 
1976 #undef DEF_VALUE_EXTRACTOR
1977 
1978 #define DEF_DUMMY_VALUE_EXTRACTOR(VALUE,DEFVAL) \
1979  template <> \
1980  inline VALUE octave_value_extract<VALUE> (const octave_value&) \
1981  { \
1982  assert (false); \
1983  return DEFVAL; \
1984  }
1985 
1988 #undef DEF_DUMMY_VALUE_EXTRACTOR
1989 
1990 #endif
OCTAVE_END_NAMESPACE(octave)
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:217
#define C(a, b)
Definition: Faddeeva.cc:259
OCTARRAY_API Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Sort by rows returns only indices.
Definition: Array-base.cc:2081
OCTARRAY_OVERRIDABLE_FUNC_API size_type size(const size_type d) const
Size of the specified dimension.
Definition: Array.h:492
Definition: Cell.h:43
Definition: dMatrix.h:42
Definition: Range.h:401
Definition: Sparse.h:49
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:94
octave::refcount< octave_idx_type > count
Definition: ov-base.h:916
virtual octave_base_value * empty_clone(void) const
Definition: ov-base.cc:105
virtual octave_base_value * try_narrowing_conversion(void)
Definition: ov-base.h:312
virtual octave_base_value * find_parent_class(const std::string &)
Definition: ov-base.h:682
octave_value_list & operator=(const octave_value_list &obj)=default
bool is_function(void) const
Definition: ov.h:822
octave::range< double > range_value(void) const
Definition: ov.h:1030
octave_value(octave_value &&a)
Definition: ov.h:381
void maybe_economize(void)
Definition: ov.h:1396
OCTINTERP_API assign_op unary_op_to_assign_op(unary_op op)
MatrixType matrix_type(void) const
Definition: ov.h:628
bool isfield(const std::string &field_name) const
Definition: ov.h:1073
OCTINTERP_API octave_user_function * xuser_function_value(const char *fmt,...) const
OCTINTERP_API octave_user_script * user_script_value(bool silent=false) const
octave_value eval(void)
Definition: ov.h:847
bool is_classdef_object(void) const
Definition: ov.h:700
OCTINTERP_API FloatComplexColumnVector xfloat_complex_column_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:1542
OCTINTERP_API octave_user_script * xuser_script_value(const char *fmt,...) const
OCTINTERP_API octave_value(const Sparse< double > &m, const MatrixType &t=MatrixType())
void make_unique(int obsolete_copies)
Definition: ov.h:422
OCTINTERP_API octave_int32 xint32_scalar_value(const char *fmt,...) const
OCTINTERP_API octave_value(const octave::idx_vector &idx, bool lazy=true)
bool is_package(void) const
Definition: ov.h:706
uint64_t uint64_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:880
octave_idx_type get_count(void) const
Definition: ov.h:475
OCTINTERP_API octave_function * function_value(bool silent=false) const
OCTINTERP_API octave_value & non_const_unary_op(unary_op op)
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
Definition: ov.h:1431
int32NDArray int32_array_value(void) const
Definition: ov.h:1001
bool iscellstr(void) const
Definition: ov.h:652
boolNDArray bool_array_value(bool warn=false) const
Definition: ov.h:936
OCTINTERP_API RowVector xrow_vector_value(const char *fmt,...) const
uint16NDArray uint16_array_value(void) const
Definition: ov.h:1010
SparseMatrix sparse_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:945
OCTINTERP_API octave_uint32 xuint32_scalar_value(const char *fmt,...) const
OCTINTERP_API double xscalar_value(const char *fmt,...) const
OCTINTERP_API octave_value(const Array< octave_uint8 > &inda)
OCTINTERP_API uint16NDArray xuint16_array_value(const char *fmt,...) const
bool iscell(void) const
Definition: ov.h:649
bool is_complex_matrix(void) const
Definition: ov.h:664
OCTINTERP_API NDArray xarray_value(const char *fmt,...) const
octave_value as_double(void) const
Definition: ov.h:494
OCTINTERP_API octave_uint8 xuint8_scalar_value(const char *fmt,...) const
OCTINTERP_API octave_fcn_handle * xfcn_handle_value(const char *fmt,...) const
OCTINTERP_API int64NDArray xint64_array_value(const char *fmt,...) const
OCTINTERP_API Array< Complex > complex_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
bool is_dld_function(void) const
Definition: ov.h:837
const octave_base_value & get_rep(void) const
Definition: ov.h:1483
bool bool_value(bool warn=false) const
Definition: ov.h:930
octave_int64 int64_scalar_value(void) const
Definition: ov.h:980
bool isreal(void) const
Definition: ov.h:783
bool issparse(void) const
Definition: ov.h:798
static OCTINTERP_API octave_base_value * make_range_rep_deprecated(double base, double inc, double limit)
OCTINTERP_API ColumnVector xcolumn_vector_value(const char *fmt,...) const
OCTINTERP_API Array< FloatComplex > xfloat_complex_vector_value(const char *fmt,...) const
octave_value convert_to_str_internal(bool pad, bool force, char type) const
Definition: ov.h:1419
OCTINTERP_API octave_value_list list_value(void) const
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
Definition: ov.h:525
OCTINTERP_API std::string xstring_value(const char *fmt,...) const
charMatrix char_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:939
octave_uint8 uint8_scalar_value(void) const
Definition: ov.h:983
OCTINTERP_API binary_op op_eq_to_binary_op(assign_op op)
DiagMatrix diag_matrix_value(bool force=false) const
Definition: ov.h:955
octave_value index_op(const octave_value_list &idx, bool resize_ok=false)
Definition: ov.h:550
bool fast_elem_insert(octave_idx_type n, const octave_value &x)
Assign the n-th element, aka 'val(n) = x'.
Definition: ov.h:1660
OCTINTERP_API ComplexRowVector complex_row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API octave_value(const int16NDArray &inda)
void erase_subfunctions(void)
Definition: ov.h:843
OCTINTERP_API FloatDiagMatrix xfloat_diag_matrix_value(const char *fmt,...) const
OCTINTERP_API FloatComplexNDArray xfloat_complex_array_value(const char *fmt,...) const
OCTINTERP_API ComplexColumnVector xcomplex_column_vector_value(const char *fmt,...) const
octave_base_value::type_conv_info numeric_conversion_function(void) const
Definition: ov.h:477
OCTINTERP_API octave_value(const int8NDArray &inda)
OCTINTERP_API FloatComplexRowVector xfloat_complex_row_vector_value(const char *fmt,...) const
bool is_instance_of(const std::string &cls_name) const
Definition: ov.h:1089
OCTINTERP_API octave_scalar_map xscalar_map_value(const char *fmt,...) const
OCTINTERP_API octave_value & assign(assign_op op, const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
octave_uint32 uint32_scalar_value(void) const
Definition: ov.h:989
OCTINTERP_API boolNDArray xbool_array_value(const char *fmt,...) const
OCTINTERP_API octave_value(const octave_int8 &i)
OCTINTERP_API unsigned short int xushort_value(const char *fmt,...) const
int int_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:857
bool is_uint16_type(void) const
Definition: ov.h:766
void print_with_name(std::ostream &os, const std::string &name) const
Definition: ov.h:1437
builtin_type_t builtin_type(void) const
Definition: ov.h:735
octave_idx_type nnz(void) const
Definition: ov.h:610
unary_op
Definition: ov.h:77
@ op_hermitian
Definition: ov.h:82
@ num_unary_ops
Definition: ov.h:85
@ op_uminus
Definition: ov.h:80
@ op_not
Definition: ov.h:78
@ op_transpose
Definition: ov.h:81
@ op_uplus
Definition: ov.h:79
@ op_incr
Definition: ov.h:83
@ op_decr
Definition: ov.h:84
int type_id(void) const
Definition: ov.h:1450
bool is_constant(void) const
Definition: ov.h:810
OCTINTERP_API boolMatrix xbool_matrix_value(const char *fmt,...) const
OCTINTERP_API SparseBoolMatrix xsparse_bool_matrix_value(const char *fmt,...) const
bool is_char_matrix(void) const
Definition: ov.h:673
OCTINTERP_API octave::range< double > xrange_value(const char *fmt,...) const
OCTINTERP_API octave_value(const Array< char > &chnda, char type='\'')
bool is_bool_scalar(void) const
Definition: ov.h:667
OCTINTERP_API PermMatrix xperm_matrix_value(const char *fmt,...) const
OCTINTERP_API octave_value(const uint32NDArray &inda)
OCTINTERP_API Array< octave_idx_type > xoctave_idx_type_vector_value(const char *fmt,...) const
OCTINTERP_API bool load_ascii(std::istream &is)
octave::idx_vector index_vector(bool require_integers=false) const
Definition: ov.h:579
int64_t int64_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:876
const octave_idx_type * mex_get_ir(void) const
Definition: ov.h:1520
octave_value diag(octave_idx_type m, octave_idx_type n) const
Definition: ov.h:1537
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx, bool auto_add)
Definition: ov.h:529
OCTINTERP_API octave_scalar_map scalar_map_value(void) const
OCTINTERP_API float xfloat_scalar_value(const char *fmt,...) const
short int short_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:850
OCTINTERP_API FloatComplex xfloat_complex_value(const char *fmt,...) const
OCTINTERP_API ComplexRowVector xcomplex_row_vector_value(const char *fmt,...) const
OCTINTERP_API octave_value_list xlist_value(const char *fmt,...) const
OCTINTERP_API octave_value(const string_vector &s, char type='\'')
OCTINTERP_API Array< float > xfloat_vector_value(const char *fmt,...) const
const octave_idx_type * mex_get_jc(void) const
Definition: ov.h:1526
OCTINTERP_API octave_value(const octave_uint32 &i)
OCTINTERP_API Matrix xmatrix_value(const char *fmt,...) const
octave_value permute(const Array< int > &vec, bool inv=false) const
Definition: ov.h:619
OCTINTERP_API 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
bool is_true(void) const
Definition: ov.h:803
FloatDiagMatrix float_diag_matrix_value(bool force=false) const
Definition: ov.h:958
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:916
std::list< std::string > parent_class_name_list(void) const
Definition: ov.h:1079
bool is_classdef_superclass_ref(void) const
Definition: ov.h:703
void short_disp(std::ostream &os) const
Definition: ov.h:1440
OCTINTERP_API Array< double > xvector_value(const char *fmt,...) const
OCTINTERP_API octave_value(const octave_int32 &i)
bool is_builtin_function(void) const
Definition: ov.h:834
OCTINTERP_API FloatMatrix xfloat_matrix_value(const char *fmt,...) const
octave_value dump(void) const
Definition: ov.h:1563
Complex complex_value(bool frc_str_conv=false) const
Definition: ov.h:910
bool is_int8_type(void) const
Definition: ov.h:751
octave_idx_type rows(void) const
Definition: ov.h:590
OCTINTERP_API octave_map xmap_value(const char *fmt,...) const
OCTINTERP_API octave_value(const Array< octave_int8 > &inda)
octave_value as_uint64(void) const
Definition: ov.h:505
octave_value as_uint16(void) const
Definition: ov.h:503
FloatComplexDiagMatrix float_complex_diag_matrix_value(bool force=false) const
Definition: ov.h:965
static OCTINTERP_API octave_value empty_conv(const std::string &type, const octave_value &rhs=octave_value())
OCTINTERP_API int xint_value(const char *fmt,...) const
bool isnumeric(void) const
Definition: ov.h:795
OCTINTERP_API Cell xcell_value(const char *fmt,...) const
octave_value as_single(void) const
Definition: ov.h:495
octave_idx_type numel(void) const
Definition: ov.h:604
OCTINTERP_API octave_value(const octave_uint64 &i)
OCTINTERP_API RowVector row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API FloatComplexColumnVector float_complex_column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) 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:789
unsigned short int ushort_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:854
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
Definition: ov.h:1500
octave_value full_value(void) const
Definition: ov.h:489
OCTINTERP_API octave_value(const octave_map &m)
OCTINTERP_API short int xshort_value(const char *fmt,...) const
bool is_magic_int(void) const
Definition: ov.h:721
OCTINTERP_API long int xlong_value(const char *fmt,...) const
bool is_dq_string(void) const
Definition: ov.h:688
octave_value squeeze(void) const
Definition: ov.h:485
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
Definition: ov.h:1540
octave_value ipermute(const Array< int > &vec) const
Definition: ov.h:622
bool is_cs_list(void) const
Definition: ov.h:715
octave_base_value * internal_rep(void) const
Definition: ov.h:1511
OCTINTERP_API octave_value_list next_subsref(int nargout, const std::string &type, const std::list< octave_value_list > &idx, std::size_t skip=1)
bool print_as_scalar(void) const
Definition: ov.h:1425
void convert_to_row_or_column_vector(void)
Definition: ov.h:1422
bool is_string(void) const
Definition: ov.h:682
OCTINTERP_API octave_user_code * xuser_code_value(const char *fmt,...) const
compound_binary_op
Definition: ov.h:115
@ op_herm_ldiv
Definition: ov.h:122
@ op_el_not_or
Definition: ov.h:124
@ op_el_not_and
Definition: ov.h:123
@ op_el_and_not
Definition: ov.h:125
@ op_mul_trans
Definition: ov.h:118
@ num_compound_binary_ops
Definition: ov.h:127
@ op_mul_herm
Definition: ov.h:120
@ op_trans_ldiv
Definition: ov.h:121
@ op_el_or_not
Definition: ov.h:126
@ op_herm_mul
Definition: ov.h:119
@ op_trans_mul
Definition: ov.h:117
OCTINTERP_API octave_value(const charNDArray &chnda, char type='\'')
OCTINTERP_API int64_t xint64_value(const char *fmt,...) const
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
Definition: ov.h:923
bool is_copy_of(const octave_value &val) const
Definition: ov.h:1485
bool is_user_code(void) const
Definition: ov.h:831
bool is_diag_matrix(void) const
Definition: ov.h:676
OCTINTERP_API octave_value(const uint16NDArray &inda)
octave_base_value * empty_clone(void) const
Definition: ov.h:391
std::string edit_display(const float_display_format &fmt, octave_idx_type i, octave_idx_type j) const
Definition: ov.h:1444
OCTINTERP_API octave_value(const Array< octave_int32 > &inda)
OCTINTERP_API octave_value(const std::map< std::string, octave_value > &)
OCTINTERP_API octave_value(const Array< octave_int64 > &inda)
octave_value as_uint32(void) const
Definition: ov.h:504
OCTINTERP_API octave_value(const SparseBoolMatrix &bm, const MatrixType &t=MatrixType())
void call_object_destructor(void)
Definition: ov.h:1561
OCTINTERP_API octave_value(const octave_value_list &m)
octave_int8 int8_scalar_value(void) const
Definition: ov.h:971
bool save_binary(std::ostream &os, bool save_as_floats)
Definition: ov.h:1494
OCTINTERP_API octave_value storable_value(void) const
bool is_defined(void) const
Definition: ov.h:637
charNDArray char_array_value(bool frc_str_conv=false) const
Definition: ov.h:942
OCTINTERP_API octave_value(const octave_int64 &i)
OCTINTERP_API uint64_t xuint64_value(const char *fmt,...) const
OCTINTERP_API octave_value next_subsref(bool auto_add, const std::string &type, const std::list< octave_value_list > &idx, std::size_t skip=1)
octave_int32 int32_scalar_value(void) const
Definition: ov.h:977
octave_uint16 uint16_scalar_value(void) const
Definition: ov.h:986
bool isinteger(void) const
Definition: ov.h:775
OCTINTERP_API Array< std::string > xcellstr_value(const char *fmt,...) const
bool is_double_type(void) const
Definition: ov.h:740
octave_value(void)
Definition: ov.h:170
OCTINTERP_API octave_int16 xint16_scalar_value(const char *fmt,...) const
bool save_ascii(std::ostream &os)
Definition: ov.h:1490
Cell cell_value(void) const
Matrix size(void)
Definition: ov.h:511
float float_scalar_value(bool frc_str_conv=false) const
Definition: ov.h:895
FloatComplex float_complex_value(bool frc_str_conv=false) const
Definition: ov.h:913
void break_closure_cycles(const std::shared_ptr< octave::stack_frame > &)
bool is_function_handle(void) const
Definition: ov.h:813
bool is_equal(const octave_value &) const
OCTINTERP_API octave_value(const SparseComplexMatrix &m, const MatrixType &t=MatrixType())
std::string class_name(void) const
Definition: ov.h:1454
octave_idx_type xnumel(const octave_value_list &idx)
Definition: ov.h:516
assign_op
Definition: ov.h:132
@ op_pow_eq
Definition: ov.h:139
@ op_asn_eq
Definition: ov.h:133
@ op_add_eq
Definition: ov.h:134
@ op_el_pow_eq
Definition: ov.h:143
@ op_mul_eq
Definition: ov.h:136
@ op_div_eq
Definition: ov.h:137
@ op_el_and_eq
Definition: ov.h:144
@ op_el_ldiv_eq
Definition: ov.h:142
@ op_sub_eq
Definition: ov.h:135
@ op_el_mul_eq
Definition: ov.h:140
@ op_el_or_eq
Definition: ov.h:145
@ op_el_div_eq
Definition: ov.h:141
@ num_assign_ops
Definition: ov.h:146
@ op_ldiv_eq
Definition: ov.h:138
OCTINTERP_API int16NDArray xint16_array_value(const char *fmt,...) const
bool is_uint32_type(void) const
Definition: ov.h:769
octave_idx_type columns(void) const
Definition: ov.h:592
OCTINTERP_API ColumnVector column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API octave_uint16 xuint16_scalar_value(const char *fmt,...) const
bool is_classdef_meta(void) const
Definition: ov.h:697
int8NDArray int8_array_value(void) const
Definition: ov.h:995
int ndims(void) const
Definition: ov.h:596
OCTINTERP_API octave_user_function * user_function_value(bool silent=false) const
OCTINTERP_API SparseComplexMatrix xsparse_complex_matrix_value(const char *fmt,...) const
bool is_user_script(void) const
Definition: ov.h:825
OCTINTERP_API octave_value(const Array< octave_idx_type > &inda, bool zero_based=false, bool cache_index=false)
OCTINTERP_API octave_value(const int64NDArray &inda)
OCTINTERP_API octave_user_code * user_code_value(bool silent=false) const
OCTINTERP_API string_vector xstring_vector_value(const char *fmt,...) const
bool is_int64_type(void) const
Definition: ov.h:760
octave_value as_int64(void) const
Definition: ov.h:500
float float_value(bool frc_str_conv=false) const
Definition: ov.h:889
OCTINTERP_API int xnint_value(const char *fmt,...) const
OCTINTERP_API octave_value(const Array< octave_uint32 > &inda)
int64NDArray int64_array_value(void) const
Definition: ov.h:1004
bool isstruct(void) const
Definition: ov.h:694
unsigned long int ulong_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:872
uint8NDArray uint8_array_value(void) const
Definition: ov.h:1007
octave_value any(int dim=0) const
Definition: ov.h:732
OCTINTERP_API octave_value(const uint64NDArray &inda)
OCTINTERP_API FloatComplexMatrix xfloat_complex_matrix_value(const char *fmt,...) const
octave_value reshape(const dim_vector &dv) const
Definition: ov.h:616
bool islocked(void) const
Definition: ov.h:1559
octave_value as_int16(void) const
Definition: ov.h:498
double scalar_value(bool frc_str_conv=false) const
Definition: ov.h:892
OCTINTERP_API octave_function * xfunction_value(const char *fmt,...) const
octave_value as_uint8(void) const
Definition: ov.h:502
OCTINTERP_API octave_base_value * clone(void) const
OCTINTERP_API int8NDArray xint8_array_value(const char *fmt,...) const
bool isnull(void) const
Definition: ov.h:724
OCTINTERP_API octave_value(const octave::range< double > &r, bool force_range=false)
OCTINTERP_API octave_value(octave_base_value *new_rep, bool borrow=false)
bool is_zero_by_zero(void) const
Definition: ov.h:601
OCTINTERP_API FloatRowVector xfloat_row_vector_value(const char *fmt,...) const
static OCTINTERP_API octave_base_value * make_range_rep_deprecated(const Range &r, bool force_range)
octave_value as_int32(void) const
Definition: ov.h:499
OCTINTERP_API octave_value(const octave_scalar_map &m, const std::string &id, const std::list< std::string > &plist)
std::size_t byte_size(void) const
Definition: ov.h:607
OCTINTERP_API uint32NDArray xuint32_array_value(const char *fmt,...) const
boolMatrix bool_matrix_value(bool warn=false) const
Definition: ov.h:933
octave_idx_type nfields(void) const
Definition: ov.h:614
OCTINTERP_API octave_value(const octave_map &m, const std::string &id, const std::list< std::string > &plist)
OCTINTERP_API SparseMatrix xsparse_matrix_value(const char *fmt,...) const
octave_value fast_elem_extract(octave_idx_type n) const
Extract the n-th element, aka 'val(n)'.
Definition: ov.h:1648
OCTINTERP_API octave_fcn_handle * fcn_handle_value(bool silent=false) const
void unlock(void)
Definition: ov.h:1557
magic_colon
Definition: ov.h:168
OCTINTERP_API Array< int > int_vector_value(bool req_int=false, bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API octave_value(const octave_base_value *)
std::string string_value(bool force=false) const
Definition: ov.h:1019
ComplexDiagMatrix complex_diag_matrix_value(bool force=false) const
Definition: ov.h:961
void lock(void)
Definition: ov.h:1555
int nint_value(bool frc_str_conv=false) const
Definition: ov.h:864
OCTINTERP_API octave_value next_subsref(const std::string &type, const std::list< octave_value_list > &idx, std::size_t skip=1)
bool is_mex_function(void) const
Definition: ov.h:840
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:901
octave_base_value * find_parent_class(const std::string &parent_class_name)
Definition: ov.h:1086
string_vector parent_class_names(void) const
Definition: ov.h:1082
OCTINTERP_API octave_value(const Array< octave_uint64 > &inda)
OCTINTERP_API octave_value & non_const_unary_op(unary_op op, const std::string &type, const std::list< octave_value_list > &idx)
bool isjava(void) const
Definition: ov.h:712
bool is_matrix_type(void) const
Definition: ov.h:792
octave_value map(octave_base_value::unary_mapper_t umap) const
Definition: ov.h:1637
bool is_int32_type(void) const
Definition: ov.h:757
OCTINTERP_API octave_value(const int32NDArray &inda)
OCTINTERP_API octave_value(const octave_int16 &i)
bool is_uint64_type(void) const
Definition: ov.h:772
octave_idx_type nzmax(void) const
Definition: ov.h:612
OCTINTERP_API octave_value(const Sparse< bool > &m, const MatrixType &t=MatrixType())
bool is_int16_type(void) const
Definition: ov.h:754
OCTINTERP_API octave_value(const octave_uint8 &i)
OCTINTERP_API octave_value(const SparseMatrix &m, const MatrixType &t=MatrixType())
void make_unique(void)
Definition: ov.h:406
long int long_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:868
uint64NDArray uint64_array_value(void) const
Definition: ov.h:1016
binary_op
Definition: ov.h:90
@ op_ldiv
Definition: ov.h:96
@ op_ne
Definition: ov.h:102
@ op_el_or
Definition: ov.h:108
@ op_el_ldiv
Definition: ov.h:106
@ op_pow
Definition: ov.h:95
@ op_ge
Definition: ov.h:100
@ num_binary_ops
Definition: ov.h:110
@ op_div
Definition: ov.h:94
@ op_el_pow
Definition: ov.h:105
@ op_mul
Definition: ov.h:93
@ op_add
Definition: ov.h:91
@ op_sub
Definition: ov.h:92
@ op_el_mul
Definition: ov.h:103
@ op_le
Definition: ov.h:98
@ op_struct_ref
Definition: ov.h:109
@ op_lt
Definition: ov.h:97
@ op_gt
Definition: ov.h:101
@ op_eq
Definition: ov.h:99
@ op_el_and
Definition: ov.h:107
@ op_el_div
Definition: ov.h:104
string_vector string_vector_value(bool pad=false) const
Definition: ov.h:1022
OCTINTERP_API FloatComplexRowVector float_complex_row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API ComplexMatrix xcomplex_matrix_value(const char *fmt,...) const
OCTINTERP_API bool xbool_value(const char *fmt,...) const
PermMatrix perm_matrix_value(void) const
Definition: ov.h:968
octave_base_value::type_conv_info numeric_demotion_function(void) const
Definition: ov.h:480
~octave_value(void)
Definition: ov.h:396
sortmode is_sorted_rows(sortmode mode=UNSORTED) const
Definition: ov.h:1552
OCTINTERP_API uint64NDArray xuint64_array_value(const char *fmt,...) const
bool is_anonymous_function(void) const
Definition: ov.h:816
OCTINTERP_API octave_value(const Sparse< Complex > &m, const MatrixType &t=MatrixType())
bool is_range(void) const
Definition: ov.h:691
OCTINTERP_API octave_value(const Array< octave_int16 > &inda)
octave_base_value * try_narrowing_conversion(void)
Definition: ov.h:507
octave_uint64 uint64_scalar_value(void) const
Definition: ov.h:992
bool all_zero_dims(void) const
Definition: ov.h:598
bool isempty(void) const
Definition: ov.h:646
SparseBoolMatrix sparse_bool_matrix_value(bool warn=false) const
Definition: ov.h:952
NDArray array_value(bool frc_str_conv=false) const
Definition: ov.h:904
bool is_real_matrix(void) const
Definition: ov.h:658
OCTINTERP_API octave_int8 xint8_scalar_value(const char *fmt,...) const
OCTINTERP_API unsigned long int xulong_value(const char *fmt,...) const
OCTINTERP_API octave_uint64 xuint64_scalar_value(const char *fmt,...) const
OCTINTERP_API octave_idx_type xidx_type_value(const char *fmt,...) const
OCTINTERP_API octave_int64 xint64_scalar_value(const char *fmt,...) const
OCTINTERP_API DiagMatrix xdiag_matrix_value(const char *fmt,...) const
OCTINTERP_API octave_value(const octave_uint16 &i)
bool is_single_type(void) const
Definition: ov.h:743
uint32NDArray uint32_array_value(void) const
Definition: ov.h:1013
OCTINTERP_API std::string get_dims_str(void) const
OCTINTERP_API FloatColumnVector xfloat_column_vector_value(const char *fmt,...) const
octave_value convert_to_str(bool pad=false, bool force=false, char type='\'') const
Definition: ov.h:1414
bool print_name_tag(std::ostream &os, const std::string &name) const
Definition: ov.h:1434
sortmode issorted(sortmode mode=UNSORTED) const
Definition: ov.h:1546
OCTINTERP_API ComplexColumnVector complex_column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API Array< float > float_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API octave_map map_value(void) const
octave_value all(int dim=0) const
Definition: ov.h:729
bool isobject(void) const
Definition: ov.h:709
octave_base_value * m_rep
The real representation.
Definition: ov.h:1669
OCTINTERP_API Array< Complex > xcomplex_vector_value(const char *fmt,...) const
OCTINTERP_API octave_value(const Array< std::string > &cellstr)
OCTINTERP_API Array< FloatComplex > float_complex_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API uint8NDArray xuint8_array_value(const char *fmt,...) const
OCTINTERP_API unsigned int xuint_value(const char *fmt,...) const
OCTINTERP_API const void * mex_get_data(mxClassID class_id=mxUNKNOWN_CLASS, mxComplexity complexity=mxREAL) const
bool is_sq_string(void) const
Definition: ov.h:685
std::size_t nparents(void) const
Definition: ov.h:1076
OCTINTERP_API ComplexNDArray xcomplex_array_value(const char *fmt,...) const
OCTINTERP_API octave_value(const uint8NDArray &inda)
OCTINTERP_API ComplexDiagMatrix xcomplex_diag_matrix_value(const char *fmt,...) const
bool is_real_scalar(void) const
Definition: ov.h:655
OCTINTERP_API bool load_hdf5(octave_hdf5_id loc_id, const char *name)
bool is_undefined(void) const
Definition: ov.h:640
OCTINTERP_API FloatComplexDiagMatrix xfloat_complex_diag_matrix_value(const char *fmt,...) const
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
Definition: ov.h:927
OCTINTERP_API octave_value single_subsref(const std::string &type, const octave_value_list &idx)
OCTINTERP_API Complex xcomplex_value(const char *fmt,...) const
OCTINTERP_API octave_value(octave_value::magic_colon)
octave_value resize(const dim_vector &dv, bool fill=false) const
Definition: ov.h:625
OCTINTERP_API octave_value(const char *s, char type='\'')
OCTINTERP_API octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout)
OCTINTERP_API FloatNDArray xfloat_array_value(const char *fmt,...) const
OCTINTERP_API octave_idx_type length(void) const
FloatNDArray float_array_value(bool frc_str_conv=false) const
Definition: ov.h:907
octave_value(const octave_value &a)
Definition: ov.h:375
octave_int16 int16_scalar_value(void) const
Definition: ov.h:974
mxArray * as_mxArray(bool interleaved=false) const
Definition: ov.h:1531
Array< std::string > cellstr_value(void) const
Definition: ov.h:1027
bool is_user_function(void) const
Definition: ov.h:828
bool is_uint8_type(void) const
Definition: ov.h:763
OCTINTERP_API Array< int > xint_vector_value(const char *fmt,...) const
int16NDArray int16_array_value(void) const
Definition: ov.h:998
MatrixType matrix_type(const MatrixType &typ) const
Definition: ov.h:631
OCTINTERP_API Array< double > vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
OCTINTERP_API octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
string_vector map_keys(void) const
Definition: ov.h:1070
bool is_inline_function(void) const
Definition: ov.h:819
OCTINTERP_API octave_value(const Array< octave_uint16 > &inda)
OCTINTERP_API charNDArray xchar_array_value(const char *fmt,...) const
Matrix matrix_value(bool frc_str_conv=false) const
Definition: ov.h:898
bool is_perm_matrix(void) const
Definition: ov.h:679
FloatComplexMatrix float_complex_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:920
void print(std::ostream &os, bool pr_as_read_syntax=false)
Definition: ov.h:1428
bool iscomplex(void) const
Definition: ov.h:786
bool is_magic_colon(void) const
Definition: ov.h:718
OCTINTERP_API octave_value undef_subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
OCTINTERP_API void maybe_mutate(void)
octave_value diag(octave_idx_type k=0) const
Definition: ov.h:1534
OCTINTERP_API octave_value & assign(assign_op, const octave_value &rhs)
OCTINTERP_API charMatrix xchar_matrix_value(const char *fmt,...) const
OCTINTERP_API octave_value(const octave_scalar_map &m)
double double_value(bool frc_str_conv=false) const
Definition: ov.h:886
unsigned int uint_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:861
bool is_complex_scalar(void) const
Definition: ov.h:661
bool is_bool_matrix(void) const
Definition: ov.h:670
OCTINTERP_API int32NDArray xint32_array_value(const char *fmt,...) const
OCTINTERP_API float_display_format get_edit_display_format(void) const
OCTINTERP_API void make_storable_value(void)
octave_value as_int8(void) const
Definition: ov.h:497
OCTINTERP_API void print_info(std::ostream &os, const std::string &prefix="") const
std::string type_name(void) const
Definition: ov.h:1452
bool is_legacy_object(void) const
Definition: ov.h:643
bool islogical(void) const
Definition: ov.h:780
OCTINTERP_API Array< octave_idx_type > octave_idx_type_vector_value(bool req_int=false, bool frc_str_conv=false, bool frc_vec_conv=false) const
bool isfloat(void) const
Definition: ov.h:746
dim_vector dims(void) const
Definition: ov.h:586
SparseComplexMatrix sparse_complex_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:949
OCTINTERP_API FloatColumnVector float_column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API FloatRowVector float_row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API octave_classdef * classdef_object_value(bool silent=false) const
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Definition: ov.h:1549
OCTINTERP_API double xdouble_value(const char *fmt,...) const
OCTINTERP_API float xfloat_value(const char *fmt,...) const
ColumnVector real(const ComplexColumnVector &a)
Definition: dColVector.cc:137
ColumnVector imag(const ComplexColumnVector &a)
Definition: dColVector.cc:143
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
function gamma(X)
Definition: gamma.f:3
octave::idx_vector idx_vector
Definition: idx-vector.h:1039
Complex log2(const Complex &x)
Definition: lo-mappers.cc:139
Complex asin(const Complex &x)
Definition: lo-mappers.cc:107
bool isna(double x)
Definition: lo-mappers.cc:47
Complex acos(const Complex &x)
Definition: lo-mappers.cc:85
Complex atan(const Complex &x)
Definition: lo-mappers.h:71
double roundb(double x)
Definition: lo-mappers.h:147
bool isfinite(double x)
Definition: lo-mappers.h:192
bool isinf(double x)
Definition: lo-mappers.h:203
double signum(double x)
Definition: lo-mappers.h:229
double round(double x)
Definition: lo-mappers.h:136
bool isnan(bool)
Definition: lo-mappers.h:178
std::complex< T > floor(const std::complex< T > &x)
Definition: lo-mappers.h:130
std::complex< T > ceil(const std::complex< T > &x)
Definition: lo-mappers.h:103
double fix(double x)
Definition: lo-mappers.h:118
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
F77_RET_T const F77_DBLE * x
double erfinv(double x)
Definition: lo-specfun.cc:1812
double dawson(double x)
Definition: lo-specfun.cc:1466
double erfcinv(double x)
Definition: lo-specfun.cc:1693
Complex expm1(const Complex &x)
Definition: lo-specfun.cc:1823
Complex log1p(const Complex &x)
Definition: lo-specfun.cc:1907
double cbrt(double x)
Definition: lo-specfun.h:289
double asinh(double x)
Definition: lo-specfun.h:58
double atanh(double x)
Definition: lo-specfun.h:63
double acosh(double x)
Definition: lo-specfun.h:40
double lgamma(double x)
Definition: lo-specfun.h:336
float_format
Definition: mach-info.h:38
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)
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:97
@ UNSORTED
Definition: oct-sort.h:97
@ ASCENDING
Definition: oct-sort.h:97
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:83
static int xisascii(int c)
Definition: ov-ch-mat.cc:246
static bool scalar(const dim_vector &dims)
Definition: ov-struct.cc:679
octave_value op_ne(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1881
octave_value op_el_ldiv(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1886
octave_value op_uplus(const octave_value &a)
Definition: ov.h:1839
octave_value op_add(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1868
octave_value op_gt(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1880
octave_value op_uminus(const octave_value &a)
Definition: ov.h:1840
octave_value op_el_div(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1884
#define DEF_DUMMY_VALUE_EXTRACTOR(VALUE, DEFVAL)
Definition: ov.h:1978
octave_value op_mul_herm(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1902
octave_value op_transpose(const octave_value &a)
Definition: ov.h:1842
OCTINTERP_API void install_types(octave::type_info &)
OCTINTERP_API octave_value cat_op(type_info &ti, const octave_value &a, const octave_value &b, const Array< octave_idx_type > &ra_idx)
octave_value op_el_or(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1888
OCTINTERP_API octave_value unary_op(type_info &ti, octave_value::unary_op op, const octave_value &a)
octave_value op_sub(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1869
OCTINTERP_API octave_value colon_op(const octave_value &base, const octave_value &increment, const octave_value &limit, bool is_for_cmd_expr=false)
octave_value op_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1870
octave_value op_hermitian(const octave_value &a)
Definition: ov.h:1843
OCTINTERP_API octave_value binary_op(type_info &ti, octave_value::binary_op op, const octave_value &a, const octave_value &b)
#define OV_COMP_BINOP_FN(name)
Definition: ov.h:1892
octave_value op_le(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1877
octave_value op_el_and(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1887
octave_value op_herm_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1901
#define MAPPER_FORWARD(F)
Definition: ov.h:1565
octave_value op_eq(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1878
octave_value op_el_pow(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1885
#define OV_UNOP_FN_OP(name, op)
Definition: ov.h:1834
#define DEF_VALUE_EXTRACTOR(VALUE, MPREFIX)
Definition: ov.h:1913
octave_value op_struct_ref(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1890
octave_value op_not(const octave_value &a)
Definition: ov.h:1838
#define OV_BINOP_FN(name)
Definition: ov.h:1850
octave_value op_ldiv(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1874
#define OV_UNOP_FN(name)
Definition: ov.h:1820
Value octave_value_extract(const octave_value &)
Definition: ov.h:1910
octave_value op_pow(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1873
octave_value op_ge(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1879
octave_value op_el_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1883
octave_value op_div(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1871
octave_value op_trans_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1899
octave_value op_mul_trans(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1900
#define OV_BINOP_FN_OP(name, op)
Definition: ov.h:1864
octave_value op_lt(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1876
static T abs(T x)
Definition: pr-output.cc:1678