GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
ov-base.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_base_h)
27 #define octave_ov_base_h 1
28 
29 #include "octave-config.h"
30 
31 #include <cstdlib>
32 
33 #include <iosfwd>
34 #include <list>
35 #include <memory>
36 #include <string>
37 
38 #include "Range.h"
39 #include "data-conv.h"
40 #include "mx-base.h"
41 #include "str-vec.h"
42 
43 #include "auto-shlib.h"
44 #include "oct-hdf5-types.h"
45 #include "oct-stream.h"
46 
48 
49 class stack_frame;
50 class type_info;
51 
52 // FIXME: This is not ideal, but it avoids including
53 // interpreter-private.h here and bringing in a lot of unnecessary
54 // symbols that require even more header files. Since the typeinfo
55 // object is required to load a user-defined octave_value object,
56 // maybe this function should be declared in a public header file?
57 
58 extern OCTINTERP_API type_info& __get_type_info__ (void);
59 
60 // For now just preserve the old interface and don't mark it as deprecated.
61 // This function is currently an internal, private function. Additional
62 // changes may be made before version 8 is finally released.
63 inline type_info& __get_type_info__ (const std::string&) { return __get_type_info__ (); }
64 
66 
67 class Cell;
69 class mxArray;
70 class octave_map;
71 class octave_scalar_map;
72 class octave_value;
73 class octave_value_list;
74 class octave_classdef;
75 class octave_function;
77 class octave_user_script;
78 class octave_user_code;
79 class octave_fcn_handle;
80 class octave_value_list;
81 
83 {
103 };
104 
105 extern OCTINTERP_API std::string btyp_class_name [];
106 
107 inline bool btyp_isnumeric (builtin_type_t btyp)
108 { return btyp <= btyp_uint64; }
109 
110 inline bool btyp_isinteger (builtin_type_t btyp)
111 { return btyp >= btyp_int8 && btyp <= btyp_uint64; }
112 
113 inline bool btyp_isfloat (builtin_type_t btyp)
114 { return btyp <= btyp_float_complex; }
115 
116 inline bool btyp_isarray (builtin_type_t btyp)
117 { return btyp <= btyp_char; }
118 
119 //! Determine the resulting type for a possible mixed-type operation.
120 //!
121 //! Rules for the resulting type:
122 //! - bool -> double
123 //! - single + double -> single
124 //! - real + complex -> complex
125 //! - integer + real -> integer
126 //! - uint + uint -> uint (the bigger one)
127 //! - sint + sint -> sint (the bigger one)
128 //!
129 //! @return The resulting type or "unknown type", if the resulting type cannot
130 //! be determined.
131 
132 extern OCTINTERP_API
134 
135 template <typename T>
137 {
139 };
140 
141 template <builtin_type_t BTYP>
143 {
144  typedef void type;
145 };
146 
147 #define DEF_BTYP_TRAITS(BTYP, CLASS) \
148  template <> \
149  struct class_to_btyp<CLASS> \
150  { \
151  static const builtin_type_t btyp = BTYP; \
152  }; \
153  \
154  template <> \
155  struct btyp_to_class<BTYP> \
156  { \
157  typedef CLASS type; \
158  }
159 
174 
175 
176 // T_ID is the type id of struct objects, set by register_type().
177 // T_NAME is the type name of struct objects.
178 
179 #define OCTAVE_EMPTY_CPP_ARG /* empty */
180 
181 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA \
182  DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 (OCTAVE_EMPTY_CPP_ARG)
183 
184 #define DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA \
185  DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(virtual)
186 
187 #define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(VIRTUAL) \
188  public: \
189  VIRTUAL int type_id (void) const { return t_id; } \
190  VIRTUAL std::string type_name (void) const { return t_name; } \
191  VIRTUAL std::string class_name (void) const { return c_name; } \
192  static int static_type_id (void) { return t_id; } \
193  static std::string static_type_name (void) { return t_name; } \
194  static std::string static_class_name (void) { return c_name; } \
195  static void register_type (void); \
196  static void register_type (octave::type_info&); \
197  \
198  private: \
199  static int t_id; \
200  static const std::string t_name; \
201  static const std::string c_name;
202 
203 #define DECLARE_TEMPLATE_OV_TYPEID_SPECIALIZATIONS(cls, type) \
204  template <> void cls<type>::register_type (void); \
205  template <> void cls<type>::register_type (octave::type_info&); \
206  template <> int cls<type>::t_id; \
207  template <> const std::string cls<type>::t_name; \
208  template <> const std::string cls<type>::c_name;
209 
210 #define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA_INTERNAL(tspec, t, n, c) \
211  tspec int t::t_id (-1); \
212  tspec const std::string t::t_name (n); \
213  tspec const std::string t::c_name (c); \
214  tspec void t::register_type (void) \
215  { \
216  octave::type_info& type_info = octave::__get_type_info__ (); \
217  \
218  register_type (type_info); \
219  } \
220  tspec void t::register_type (octave::type_info& ti) \
221  { \
222  octave_value v (new t ()); \
223  t_id = ti.register_type (t::t_name, t::c_name, v); \
224  }
225 
226 #define DEFINE_TEMPLATE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c) \
227  DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA_INTERNAL (template <>, t, n, c)
228 
229 #define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c) \
230  DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA_INTERNAL ( , t, n, c)
231 
232 // A base value type, so that derived types only have to redefine what
233 // they need (if they are derived from octave_base_value instead of
234 // octave_value).
235 
236 class
237 OCTINTERP_API
239 {
240 public:
241 
242  typedef octave_base_value *(*type_conv_fcn) (const octave_base_value&);
243 
244  // type conversion, including result type information
246  {
247  public:
248  type_conv_info (type_conv_fcn f = nullptr, int t = -1)
249  : m_fcn (f), m_type_id (t) { }
250 
251  operator type_conv_fcn (void) const { return m_fcn; }
252 
253  octave_base_value * operator () (const octave_base_value& v) const
254  { return (*m_fcn) (v); }
255 
256  int type_id (void) const { return m_type_id; }
257 
258  private:
259  type_conv_fcn m_fcn;
261  };
262 
263  friend class octave_value;
264 
265  octave_base_value (void) : count (1) { }
266 
267  octave_base_value (const octave_base_value&) : count (1) { }
268 
269  virtual ~octave_base_value (void) = default;
270 
271  // Unconditional clone. Always clones.
272  virtual octave_base_value *
273  clone (void) const { return new octave_base_value (*this); }
274 
275  // Empty clone.
276  virtual octave_base_value *
277  empty_clone (void) const;
278 
279  // Unique clone. Usually clones, but may be overridden to fake the
280  // cloning when sharing copies is to be controlled from within an
281  // instance (see octave_class).
282  virtual octave_base_value *
283  unique_clone (void) { return clone (); }
284 
285  virtual void break_closure_cycles (const std::shared_ptr<octave::stack_frame>&) { }
286 
287  virtual type_conv_info
289  { return type_conv_info (); }
290 
291  virtual type_conv_info
293  { return type_conv_info (); }
294 
295  virtual octave_value squeeze (void) const;
296 
297  virtual octave_value full_value (void) const;
298 
299  virtual octave_value as_double (void) const;
300  virtual octave_value as_single (void) const;
301 
302  virtual octave_value as_int8 (void) const;
303  virtual octave_value as_int16 (void) const;
304  virtual octave_value as_int32 (void) const;
305  virtual octave_value as_int64 (void) const;
306 
307  virtual octave_value as_uint8 (void) const;
308  virtual octave_value as_uint16 (void) const;
309  virtual octave_value as_uint32 (void) const;
310  virtual octave_value as_uint64 (void) const;
311 
313  { return nullptr; }
314 
315  virtual void maybe_economize (void) { }
316 
317  virtual Matrix size (void);
318 
319  virtual octave_idx_type xnumel (const octave_value_list&);
320 
321  // FIXME: Do we really need all three of these versions of subsref?
322 
323  virtual octave_value
324  subsref (const std::string& type,
325  const std::list<octave_value_list>& idx);
326 
327  virtual octave_value_list
328  subsref (const std::string& type,
329  const std::list<octave_value_list>& idx,
330  int nargout);
331 
332  virtual octave_value
333  subsref (const std::string& type,
334  const std::list<octave_value_list>& idx,
335  bool auto_add);
336 
337  virtual octave_value
338  do_index_op (const octave_value_list& idx, bool resize_ok = false);
339 
340  virtual void assign (const std::string&, const octave_value&) { }
341 
342  virtual octave_value
343  subsasgn (const std::string& type,
344  const std::list<octave_value_list>& idx,
345  const octave_value& rhs);
346 
347  virtual octave_value
348  undef_subsasgn (const std::string& type,
349  const std::list<octave_value_list>& idx,
350  const octave_value& rhs);
351 
352  virtual octave::idx_vector index_vector (bool require_integers = false) const;
353 
354  virtual dim_vector dims (void) const { return dim_vector (); }
355 
356  octave_idx_type rows (void) const
357  {
358  const dim_vector dv = dims ();
359 
360  return dv(0);
361  }
362 
364  {
365  const dim_vector dv = dims ();
366 
367  return dv(1);
368  }
369 
370  virtual int ndims (void) const
371  { return dims ().ndims (); }
372 
373  virtual octave_idx_type numel (void) const { return dims ().numel (); }
374 
375  virtual std::size_t byte_size (void) const { return 0; }
376 
377  virtual octave_idx_type nnz (void) const;
378 
379  virtual octave_idx_type nzmax (void) const;
380 
381  virtual octave_idx_type nfields (void) const;
382 
383  virtual octave_value reshape (const dim_vector&) const;
384 
385  virtual octave_value permute (const Array<int>& vec, bool = false) const;
386 
387  virtual octave_value resize (const dim_vector&, bool fill = false) const;
388 
389  virtual MatrixType matrix_type (void) const;
390 
391  virtual MatrixType matrix_type (const MatrixType& typ) const;
392 
393  virtual bool is_defined (void) const { return false; }
394 
395  virtual bool is_storable (void) const { return true; }
396 
397  virtual bool is_legacy_object (void) const { return false; }
398 
399  bool isempty (void) const { return (dims ().any_zero ()); }
400 
401  bool is_zero_by_zero (void) const { return dims().zero_by_zero (); }
402 
403  virtual bool iscell (void) const { return false; }
404 
405  virtual bool iscellstr (void) const { return false; }
406 
407  virtual bool is_real_scalar (void) const { return false; }
408 
409  virtual bool is_real_matrix (void) const { return false; }
410 
411  virtual bool is_complex_scalar (void) const { return false; }
412 
413  virtual bool is_complex_matrix (void) const { return false; }
414 
415  virtual bool is_bool_scalar (void) const { return false; }
416 
417  virtual bool is_bool_matrix (void) const { return false; }
418 
419  virtual bool is_char_matrix (void) const { return false; }
420 
421  virtual bool is_diag_matrix (void) const { return false; }
422 
423  virtual bool is_perm_matrix (void) const { return false; }
424 
425  virtual bool is_string (void) const { return false; }
426 
427  virtual bool is_sq_string (void) const { return false; }
428 
429  virtual bool is_range (void) const { return false; }
430 
431  virtual bool isstruct (void) const { return false; }
432 
433  virtual bool isobject (void) const { return false; }
434 
435  virtual bool is_classdef_meta (void) const { return false; }
436 
437  virtual bool is_classdef_superclass_ref (void) const { return false; }
438 
439  virtual bool is_classdef_object (void) const { return false; }
440 
441  virtual bool is_package (void) const { return false; }
442 
443  virtual bool isjava (void) const { return false; }
444 
445  virtual bool is_cs_list (void) const { return false; }
446 
447  virtual bool is_magic_colon (void) const { return false; }
448 
449  virtual bool is_all_va_args (void) const { return false; }
450 
451  virtual octave_value all (int = 0) const;
452 
453  virtual octave_value any (int = 0) const;
454 
455  virtual builtin_type_t builtin_type (void) const { return btyp_unknown; }
456 
457  virtual bool is_double_type (void) const { return false; }
458 
459  virtual bool is_single_type (void) const { return false; }
460 
461  virtual bool isfloat (void) const { return false; }
462 
463  virtual bool is_int8_type (void) const { return false; }
464 
465  virtual bool is_int16_type (void) const { return false; }
466 
467  virtual bool is_int32_type (void) const { return false; }
468 
469  virtual bool is_int64_type (void) const { return false; }
470 
471  virtual bool is_uint8_type (void) const { return false; }
472 
473  virtual bool is_uint16_type (void) const { return false; }
474 
475  virtual bool is_uint32_type (void) const { return false; }
476 
477  virtual bool is_uint64_type (void) const { return false; }
478 
479  virtual bool islogical (void) const { return false; }
480 
481  virtual bool isinteger (void) const { return false; }
482 
483  virtual bool isreal (void) const { return false; }
484 
485  virtual bool iscomplex (void) const { return false; }
486 
487  // Would be nice to get rid of the next four functions:
488 
489  virtual bool is_scalar_type (void) const { return false; }
490 
491  virtual bool is_matrix_type (void) const { return false; }
492 
493  virtual bool isnumeric (void) const { return false; }
494 
495  virtual bool issparse (void) const { return false; }
496 
497  virtual bool is_true (void) const { return false; }
498 
499  virtual bool is_magic_int (void) const { return false; }
500 
501  virtual bool isnull (void) const { return false; }
502 
503  virtual bool is_constant (void) const { return false; }
504 
505  virtual bool is_function_handle (void) const { return false; }
506 
507  virtual bool is_anonymous_function (void) const { return false; }
508 
509  virtual bool is_inline_function (void) const { return false; }
510 
511  virtual bool is_function (void) const { return false; }
512 
513  virtual bool is_user_script (void) const { return false; }
514 
515  virtual bool is_user_function (void) const { return false; }
516 
517  virtual bool is_user_code (void) const { return false; }
518 
519  virtual bool is_builtin_function (void) const { return false; }
520 
521  virtual bool is_dld_function (void) const { return false; }
522 
523  virtual bool is_mex_function (void) const { return false; }
524 
525  virtual void erase_subfunctions (void) { }
526 
527  virtual short int short_value (bool = false, bool = false) const;
528 
529  virtual unsigned short int ushort_value (bool = false, bool = false) const;
530 
531  virtual int int_value (bool = false, bool = false) const;
532 
533  virtual unsigned int uint_value (bool = false, bool = false) const;
534 
535  virtual int nint_value (bool = false) const;
536 
537  virtual long int long_value (bool = false, bool = false) const;
538 
539  virtual unsigned long int ulong_value (bool = false, bool = false) const;
540 
541  virtual int64_t int64_value (bool = false, bool = false) const;
542 
543  virtual uint64_t uint64_value (bool = false, bool = false) const;
544 
545  virtual double double_value (bool = false) const;
546 
547  virtual float float_value (bool = false) const;
548 
549  virtual double scalar_value (bool frc_str_conv = false) const
550  { return double_value (frc_str_conv); }
551 
552  virtual float float_scalar_value (bool frc_str_conv = false) const
553  { return float_value (frc_str_conv); }
554 
555  virtual Cell cell_value (void) const;
556 
557  virtual Matrix matrix_value (bool = false) const;
558 
559  virtual FloatMatrix float_matrix_value (bool = false) const;
560 
561  virtual NDArray array_value (bool = false) const;
562 
563  virtual FloatNDArray float_array_value (bool = false) const;
564 
565  virtual Complex complex_value (bool = false) const;
566 
567  virtual FloatComplex float_complex_value (bool = false) const;
568 
569  virtual ComplexMatrix complex_matrix_value (bool = false) const;
570 
571  virtual FloatComplexMatrix float_complex_matrix_value (bool = false) const;
572 
573  virtual ComplexNDArray complex_array_value (bool = false) const;
574 
575  virtual FloatComplexNDArray float_complex_array_value (bool = false) const;
576 
577  virtual bool bool_value (bool = false) const;
578 
579  virtual boolMatrix bool_matrix_value (bool = false) const;
580 
581  virtual boolNDArray bool_array_value (bool = false) const;
582 
583  virtual charMatrix char_matrix_value (bool force = false) const;
584 
585  virtual charNDArray char_array_value (bool = false) const;
586 
587  virtual SparseMatrix sparse_matrix_value (bool = false) const;
588 
589  virtual SparseComplexMatrix sparse_complex_matrix_value (bool = false) const;
590 
591  virtual SparseBoolMatrix sparse_bool_matrix_value (bool = false) const;
592 
593  virtual DiagMatrix diag_matrix_value (bool = false) const;
594 
595  virtual FloatDiagMatrix float_diag_matrix_value (bool = false) const;
596 
597  virtual ComplexDiagMatrix complex_diag_matrix_value (bool = false) const;
598 
599  virtual FloatComplexDiagMatrix
600  float_complex_diag_matrix_value (bool = false) const;
601 
602  virtual PermMatrix perm_matrix_value (void) const;
603 
604  virtual octave_int8 int8_scalar_value (void) const;
605 
606  virtual octave_int16 int16_scalar_value (void) const;
607 
608  virtual octave_int32 int32_scalar_value (void) const;
609 
610  virtual octave_int64 int64_scalar_value (void) const;
611 
612  virtual octave_uint8 uint8_scalar_value (void) const;
613 
614  virtual octave_uint16 uint16_scalar_value (void) const;
615 
616  virtual octave_uint32 uint32_scalar_value (void) const;
617 
618  virtual octave_uint64 uint64_scalar_value (void) const;
619 
620  virtual int8NDArray int8_array_value (void) const;
621 
622  virtual int16NDArray int16_array_value (void) const;
623 
624  virtual int32NDArray int32_array_value (void) const;
625 
626  virtual int64NDArray int64_array_value (void) const;
627 
628  virtual uint8NDArray uint8_array_value (void) const;
629 
630  virtual uint16NDArray uint16_array_value (void) const;
631 
632  virtual uint32NDArray uint32_array_value (void) const;
633 
634  virtual uint64NDArray uint64_array_value (void) const;
635 
636  virtual string_vector string_vector_value (bool pad = false) const;
637 
638  virtual std::string string_value (bool force = false) const;
639 
640  virtual Array<std::string> cellstr_value (void) const;
641 
642  virtual octave::range<double> range_value (void) const;
643 
644  // For now, disable all but range<double>.
645 
646 #if 0
647 
648  virtual octave::range<float> float_range_value (void) const;
649 
650  virtual octave::range<octave_int8> int8_range_value (void) const;
651 
652  virtual octave::range<octave_int16> int16_range_value (void) const;
653 
654  virtual octave::range<octave_int32> int32_range_value (void) const;
655 
656  virtual octave::range<octave_int64> int64_range_value (void) const;
657 
658  virtual octave::range<octave_uint8> uint8_range_value (void) const;
659 
660  virtual octave::range<octave_uint16> uint16_range_value (void) const;
661 
662  virtual octave::range<octave_uint32> uint32_range_value (void) const;
663 
664  virtual octave::range<octave_uint64> uint64_range_value (void) const;
665 
666 #endif
667 
668  virtual octave_map map_value (void) const;
669 
670  virtual octave_scalar_map scalar_map_value (void) const;
671 
672  virtual string_vector map_keys (void) const;
673 
674  virtual bool isfield (const std::string&) const;
675 
676  virtual std::size_t nparents (void) const;
677 
678  virtual std::list<std::string> parent_class_name_list (void) const;
679 
680  virtual string_vector parent_class_names (void) const;
681 
682  virtual octave_base_value * find_parent_class (const std::string&)
683  { return nullptr; }
684 
685  virtual octave_base_value * unique_parent_class (const std::string&)
686  { return nullptr; }
687 
688  virtual bool is_instance_of (const std::string&) const
689  { return false; }
690 
691  virtual octave_classdef * classdef_object_value (bool silent = false);
692 
693  virtual octave_function * function_value (bool silent = false);
694 
695  virtual octave_user_function * user_function_value (bool silent = false);
696 
697  virtual octave_user_script * user_script_value (bool silent = false);
698 
699  virtual octave_user_code * user_code_value (bool silent = false);
700 
701  virtual octave_fcn_handle * fcn_handle_value (bool silent = false);
702 
703  virtual octave_value_list list_value (void) const;
704 
705  virtual octave_value convert_to_str (bool pad = false, bool force = false,
706  char type = '\'') const;
707  virtual octave_value
708  convert_to_str_internal (bool pad, bool force, char type) const;
709 
710  virtual void convert_to_row_or_column_vector (void);
711 
712  // The following extractor functions don't perform any implicit type
713  // conversions.
714 
715  virtual std::string xstring_value () const;
716 
717  virtual bool print_as_scalar (void) const { return false; }
718 
719  virtual void print (std::ostream& os, bool pr_as_read_syntax = false);
720 
721  virtual void
722  print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
723 
724  virtual bool
725  print_name_tag (std::ostream& os, const std::string& name) const;
726 
727  virtual void
728  print_with_name (std::ostream& output_buf, const std::string& name,
729  bool print_padding = true);
730 
731  virtual void short_disp (std::ostream& os) const { os << "..."; }
732 
733  virtual float_display_format get_edit_display_format (void) const;
734 
735  virtual std::string edit_display (const float_display_format&,
737  { return "#VAL"; }
738 
739  virtual void print_info (std::ostream& os, const std::string& prefix) const;
740 
741  virtual bool save_ascii (std::ostream& os);
742 
743  virtual bool load_ascii (std::istream& is);
744 
745  virtual bool save_binary (std::ostream& os, bool save_as_floats);
746 
747  virtual bool load_binary (std::istream& is, bool swap,
749 
750  virtual bool
751  save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats);
752 
753  virtual bool
754  load_hdf5 (octave_hdf5_id loc_id, const char *name);
755 
756  virtual int
757  write (octave::stream& os, int block_size,
758  oct_data_conv::data_type output_type, int skip,
759  octave::mach_info::float_format flt_fmt) const;
760 
761  virtual const void * mex_get_data (void) const { return nullptr; }
762 
763  virtual const octave_idx_type * mex_get_ir (void) const { return nullptr; }
764 
765  virtual const octave_idx_type * mex_get_jc (void) const { return nullptr; }
766 
767  virtual mxArray * as_mxArray (bool interleaved) const;
768 
769  virtual octave_value diag (octave_idx_type k = 0) const;
770 
772 
773  virtual octave_value sort (octave_idx_type dim = 0,
774  sortmode mode = ASCENDING) const;
776  octave_idx_type dim = 0,
777  sortmode mode = ASCENDING) const;
778 
779  virtual sortmode issorted (sortmode mode = UNSORTED) const;
780 
781  virtual Array<octave_idx_type>
782  sort_rows_idx (sortmode mode = ASCENDING) const;
783 
784  virtual sortmode is_sorted_rows (sortmode mode = UNSORTED) const;
785 
786  virtual void lock (void);
787 
788  virtual void unlock (void);
789 
790  virtual bool islocked (void) const { return false; }
791 
792  virtual void call_object_destructor (void) { }
793 
794  virtual octave_value dump (void) const;
795 
796  // Standard mappers. Register new ones here.
798  {
860  num_unary_mappers = umap_unknown
861  };
862 
863  virtual octave_value map (unary_mapper_t) const;
864 
865  // These are fast indexing & assignment shortcuts for extracting
866  // or inserting a single scalar from/to an array.
867 
868  // Extract the n-th element, aka val(n). Result is undefined if val is not
869  // an array type or n is out of range. Never error.
870  virtual octave_value
872 
873  // Assign the n-th element, aka val(n) = x. Returns false if val is not an
874  // array type, x is not a matching scalar type, or n is out of range.
875  // Never error.
876  virtual bool
878 
879  // This is a helper for the above, to be overridden in scalar types. The
880  // whole point is to handle the insertion efficiently with just *two* VM
881  // calls, which is basically the theoretical minimum.
882  virtual bool
883  fast_elem_insert_self (void *where, builtin_type_t btyp) const;
884 
885 protected:
886 
887  // This should only be called for derived types.
888 
889  OCTINTERP_API octave_value
890  numeric_assign (const std::string& type,
891  const std::list<octave_value_list>& idx,
892  const octave_value& rhs);
893 
894  void reset_indent_level (void) const
895  { s_curr_print_indent_level = 0; }
896 
897  void increment_indent_level (void) const
898  { s_curr_print_indent_level += 2; }
899 
900  void decrement_indent_level (void) const
901  { s_curr_print_indent_level -= 2; }
902 
903  int current_print_indent_level (void) const
904  { return s_curr_print_indent_level; }
905 
906  OCTINTERP_API void indent (std::ostream& os) const;
907 
908  OCTINTERP_API void newline (std::ostream& os) const;
909 
910  OCTINTERP_API void reset (void) const;
911 
912  // A reference count.
913  // NOTE: the declaration is octave_idx_type because with 64-bit indexing,
914  // it is well possible to have more than MAX_INT copies of a single value
915  // (think of an empty cell array with >2G elements).
916  octave::refcount<octave_idx_type> count;
917 
918  OCTINTERP_API static const char * get_umap_name (unary_mapper_t);
919 
920  OCTINTERP_API void warn_load (const char *type) const;
921  OCTINTERP_API void warn_save (const char *type) const;
922 
923 private:
924 
925  OCTINTERP_API void wrong_type_arg_error (void) const;
926 
927  //--------
928 
930  static bool s_beginning_of_line;
931 
933 };
934 
935 class
936 OCTINTERP_API
938 {
939 public:
940 
941  octave_base_dld_value (void) = default;
942 
944  {
945  m_containing_dynamic_library.delete_later ();
946  }
947 
949 
950 private:
951 
952  octave::auto_shlib m_containing_dynamic_library;
953 };
954 
955 OCTAVE_DEPRECATED (8, "Vsparse_auto_mutate is obsolete and is now always false")
956 extern OCTINTERP_API bool Vsparse_auto_mutate;
957 
958 // Utility function to convert C++ arguments used in subsref/subsasgn into an
959 // octave_value_list object that can be used to call a function/method in the
960 // interpreter.
961 extern OCTINTERP_API octave_value
962 make_idx_args (const std::string& type,
963  const std::list<octave_value_list>& idx,
964  const std::string& who);
965 
966 // Tells whether some regular octave_value_base methods are being called from
967 // within the "builtin" function.
968 extern OCTINTERP_API bool called_from_builtin (void);
969 
970 #endif
OCTAVE_END_NAMESPACE(octave)
Definition: Cell.h:43
Definition: dMatrix.h:42
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:94
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
Definition: dim-vector.h:335
bool zero_by_zero(void) const
Definition: dim-vector.h:311
octave_idx_type ndims(void) const
Number of dimensions.
Definition: dim-vector.h:257
octave_base_dld_value(const octave_base_dld_value &)=default
octave_base_dld_value(void)=default
~octave_base_dld_value(void)
Definition: ov-base.h:943
octave::auto_shlib m_containing_dynamic_library
Definition: ov-base.h:952
type_conv_info(type_conv_fcn f=nullptr, int t=-1)
Definition: ov-base.h:248
virtual bool is_mex_function(void) const
Definition: ov-base.h:523
virtual bool isinteger(void) const
Definition: ov-base.h:481
virtual bool is_uint64_type(void) const
Definition: ov-base.h:477
virtual ~octave_base_value(void)=default
virtual type_conv_info numeric_conversion_function(void) const
Definition: ov-base.h:288
virtual bool isfloat(void) const
Definition: ov-base.h:461
virtual type_conv_info numeric_demotion_function(void) const
Definition: ov-base.h:292
virtual bool is_real_matrix(void) const
Definition: ov-base.h:409
octave_idx_type columns(void) const
Definition: ov-base.h:363
octave::refcount< octave_idx_type > count
Definition: ov-base.h:916
virtual bool is_classdef_superclass_ref(void) const
Definition: ov-base.h:437
void decrement_indent_level(void) const
Definition: ov-base.h:900
virtual bool is_classdef_object(void) const
Definition: ov-base.h:439
virtual bool is_diag_matrix(void) const
Definition: ov-base.h:421
virtual bool is_function(void) const
Definition: ov-base.h:511
virtual void short_disp(std::ostream &os) const
Definition: ov-base.h:731
static int s_curr_print_indent_level
Definition: ov-base.h:929
virtual bool is_user_code(void) const
Definition: ov-base.h:517
void increment_indent_level(void) const
Definition: ov-base.h:897
virtual bool is_package(void) const
Definition: ov-base.h:441
virtual bool issparse(void) const
Definition: ov-base.h:495
static bool s_beginning_of_line
Definition: ov-base.h:930
virtual bool is_uint16_type(void) const
Definition: ov-base.h:473
virtual bool is_constant(void) const
Definition: ov-base.h:503
virtual bool is_uint32_type(void) const
Definition: ov-base.h:475
virtual bool is_storable(void) const
Definition: ov-base.h:395
virtual bool is_user_function(void) const
Definition: ov-base.h:515
virtual void erase_subfunctions(void)
Definition: ov-base.h:525
int current_print_indent_level(void) const
Definition: ov-base.h:903
virtual bool is_string(void) const
Definition: ov-base.h:425
virtual octave_base_value * unique_parent_class(const std::string &)
Definition: ov-base.h:685
virtual bool is_complex_matrix(void) const
Definition: ov-base.h:413
virtual std::size_t byte_size(void) const
Definition: ov-base.h:375
virtual bool is_int32_type(void) const
Definition: ov-base.h:467
virtual void call_object_destructor(void)
Definition: ov-base.h:792
virtual bool isjava(void) const
Definition: ov-base.h:443
virtual float float_scalar_value(bool frc_str_conv=false) const
Definition: ov-base.h:552
virtual bool is_function_handle(void) const
Definition: ov-base.h:505
virtual bool print_as_scalar(void) const
Definition: ov-base.h:717
virtual bool is_magic_int(void) const
Definition: ov-base.h:499
virtual bool is_true(void) const
Definition: ov-base.h:497
virtual bool is_legacy_object(void) const
Definition: ov-base.h:397
virtual const void * mex_get_data(void) const
Definition: ov-base.h:761
virtual const octave_idx_type * mex_get_ir(void) const
Definition: ov-base.h:763
virtual octave_base_value * unique_clone(void)
Definition: ov-base.h:283
virtual void assign(const std::string &, const octave_value &)
Definition: ov-base.h:340
virtual bool iscellstr(void) const
Definition: ov-base.h:405
virtual bool is_uint8_type(void) const
Definition: ov-base.h:471
virtual bool is_bool_scalar(void) const
Definition: ov-base.h:415
virtual bool is_inline_function(void) const
Definition: ov-base.h:509
virtual bool islogical(void) const
Definition: ov-base.h:479
virtual bool is_user_script(void) const
Definition: ov-base.h:513
bool is_zero_by_zero(void) const
Definition: ov-base.h:401
virtual std::string edit_display(const float_display_format &, octave_idx_type, octave_idx_type) const
Definition: ov-base.h:735
virtual bool isobject(void) const
Definition: ov-base.h:433
octave_base_value(void)
Definition: ov-base.h:265
virtual bool is_matrix_type(void) const
Definition: ov-base.h:491
virtual bool is_complex_scalar(void) const
Definition: ov-base.h:411
virtual bool is_bool_matrix(void) const
Definition: ov-base.h:417
virtual void maybe_economize(void)
Definition: ov-base.h:315
virtual const octave_idx_type * mex_get_jc(void) const
Definition: ov-base.h:765
virtual bool is_scalar_type(void) const
Definition: ov-base.h:489
void reset_indent_level(void) const
Definition: ov-base.h:894
virtual bool is_all_va_args(void) const
Definition: ov-base.h:449
virtual bool is_cs_list(void) const
Definition: ov-base.h:445
virtual bool is_int16_type(void) const
Definition: ov-base.h:465
virtual dim_vector dims(void) const
Definition: ov-base.h:354
virtual octave_idx_type numel(void) const
Definition: ov-base.h:373
virtual builtin_type_t builtin_type(void) const
Definition: ov-base.h:455
virtual bool is_dld_function(void) const
Definition: ov-base.h:521
octave_base_value(const octave_base_value &)
Definition: ov-base.h:267
virtual bool is_int8_type(void) const
Definition: ov-base.h:463
virtual bool isstruct(void) const
Definition: ov-base.h:431
virtual octave_base_value * try_narrowing_conversion(void)
Definition: ov-base.h:312
octave_idx_type rows(void) const
Definition: ov-base.h:356
virtual bool is_double_type(void) const
Definition: ov-base.h:457
virtual double scalar_value(bool frc_str_conv=false) const
Definition: ov-base.h:549
virtual octave_base_value * find_parent_class(const std::string &)
Definition: ov-base.h:682
virtual bool is_char_matrix(void) const
Definition: ov-base.h:419
virtual bool is_anonymous_function(void) const
Definition: ov-base.h:507
virtual bool is_int64_type(void) const
Definition: ov-base.h:469
virtual bool islocked(void) const
Definition: ov-base.h:790
virtual bool is_instance_of(const std::string &) const
Definition: ov-base.h:688
virtual int ndims(void) const
Definition: ov-base.h:370
virtual bool isnull(void) const
Definition: ov-base.h:501
virtual bool is_real_scalar(void) const
Definition: ov-base.h:407
virtual bool iscomplex(void) const
Definition: ov-base.h:485
virtual bool is_perm_matrix(void) const
Definition: ov-base.h:423
virtual bool is_classdef_meta(void) const
Definition: ov-base.h:435
virtual void break_closure_cycles(const std::shared_ptr< octave::stack_frame > &)
Definition: ov-base.h:285
virtual bool is_single_type(void) const
Definition: ov-base.h:459
virtual bool is_magic_colon(void) const
Definition: ov-base.h:447
virtual bool isreal(void) const
Definition: ov-base.h:483
virtual bool isnumeric(void) const
Definition: ov-base.h:493
virtual bool is_defined(void) const
Definition: ov-base.h:393
virtual bool is_sq_string(void) const
Definition: ov-base.h:427
virtual octave_base_value * clone(void) const
Definition: ov-base.h:273
virtual bool iscell(void) const
Definition: ov-base.h:403
bool isempty(void) const
Definition: ov-base.h:399
virtual bool is_builtin_function(void) const
Definition: ov-base.h:519
virtual bool is_range(void) const
Definition: ov-base.h:429
octave::range< double > range_value(void) const
Definition: ov.h:1030
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_script * user_script_value(bool silent=false) const
uint64_t uint64_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:880
OCTINTERP_API octave_function * function_value(bool silent=false) const
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
boolNDArray bool_array_value(bool warn=false) const
Definition: ov.h:936
uint16NDArray uint16_array_value(void) const
Definition: ov.h:1010
SparseMatrix sparse_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:945
bool bool_value(bool warn=false) const
Definition: ov.h:930
octave_int64 int64_scalar_value(void) const
Definition: ov.h:980
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
DiagMatrix diag_matrix_value(bool force=false) const
Definition: ov.h:955
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
octave_uint32 uint32_scalar_value(void) const
Definition: ov.h:989
int int_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:857
void print_with_name(std::ostream &os, const std::string &name) const
Definition: ov.h:1437
octave_idx_type nnz(void) const
Definition: ov.h:610
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
OCTINTERP_API octave_scalar_map scalar_map_value(void) const
short int short_value(bool req_int=false, bool frc_str_conv=false) const
Definition: ov.h:850
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
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
octave_value dump(void) const
Definition: ov.h:1563
Complex complex_value(bool frc_str_conv=false) const
Definition: ov.h:910
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
octave_value as_single(void) const
Definition: ov.h:495
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
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
void convert_to_row_or_column_vector(void)
Definition: ov.h:1422
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
Definition: ov.h:923
octave_base_value * empty_clone(void) const
Definition: ov.h:391
octave_value as_uint32(void) const
Definition: ov.h:504
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
charNDArray char_array_value(bool frc_str_conv=false) const
Definition: ov.h:942
octave_int32 int32_scalar_value(void) const
Definition: ov.h:977
octave_uint16 uint16_scalar_value(void) const
Definition: ov.h:986
bool save_ascii(std::ostream &os)
Definition: ov.h:1490
Cell cell_value(void) const
Matrix size(void)
Definition: ov.h:511
FloatComplex float_complex_value(bool frc_str_conv=false) const
Definition: ov.h:913
octave_idx_type xnumel(const octave_value_list &idx)
Definition: ov.h:516
int8NDArray int8_array_value(void) const
Definition: ov.h:995
OCTINTERP_API octave_user_function * user_function_value(bool silent=false) const
OCTINTERP_API octave_user_code * user_code_value(bool silent=false) const
octave_value as_int64(void) const
Definition: ov.h:500
float float_value(bool frc_str_conv=false) const
Definition: ov.h:889
int64NDArray int64_array_value(void) const
Definition: ov.h:1004
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
octave_value reshape(const dim_vector &dv) const
Definition: ov.h:616
octave_value as_int16(void) const
Definition: ov.h:498
octave_value as_uint8(void) const
Definition: ov.h:502
OCTINTERP_API octave_base_value * clone(void) const
octave_value as_int32(void) const
Definition: ov.h:499
boolMatrix bool_matrix_value(bool warn=false) const
Definition: ov.h:933
octave_idx_type nfields(void) const
Definition: ov.h:614
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
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
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:901
string_vector parent_class_names(void) const
Definition: ov.h:1082
octave_value map(octave_base_value::unary_mapper_t umap) const
Definition: ov.h:1637
octave_idx_type nzmax(void) const
Definition: ov.h:612
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
string_vector string_vector_value(bool pad=false) const
Definition: ov.h:1022
PermMatrix perm_matrix_value(void) const
Definition: ov.h:968
sortmode is_sorted_rows(sortmode mode=UNSORTED) const
Definition: ov.h:1552
octave_uint64 uint64_scalar_value(void) const
Definition: ov.h:992
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
uint32NDArray uint32_array_value(void) const
Definition: ov.h:1013
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 octave_map map_value(void) const
octave_value all(int dim=0) const
Definition: ov.h:729
std::size_t nparents(void) const
Definition: ov.h:1076
OCTINTERP_API bool load_hdf5(octave_hdf5_id loc_id, const char *name)
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
Definition: ov.h:927
octave_value resize(const dim_vector &dv, bool fill=false) const
Definition: ov.h:625
FloatNDArray float_array_value(bool frc_str_conv=false) const
Definition: ov.h:907
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
int16NDArray int16_array_value(void) const
Definition: ov.h:998
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
Matrix matrix_value(bool frc_str_conv=false) const
Definition: ov.h:898
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
OCTINTERP_API octave_value undef_subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
octave_value diag(octave_idx_type k=0) const
Definition: ov.h:1534
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
octave_value as_int8(void) const
Definition: ov.h:497
OCTINTERP_API void print_info(std::ostream &os, const std::string &prefix="") const
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 octave_classdef * classdef_object_value(bool silent=false) const
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Definition: ov.h:1549
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
octave::idx_vector idx_vector
Definition: idx-vector.h:1039
F77_RET_T const F77_DBLE * x
F77_RET_T const F77_DBLE const F77_DBLE * f
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
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
static double as_double(OCTAVE_TIME_T sec, long usec)
Definition: oct-time.h:35
OCTINTERP_API std::string btyp_class_name[]
Definition: ov-base.cc:89
bool btyp_isnumeric(builtin_type_t btyp)
Definition: ov-base.h:107
#define DEF_BTYP_TRAITS(BTYP, CLASS)
Definition: ov-base.h:147
bool btyp_isinteger(builtin_type_t btyp)
Definition: ov-base.h:110
OCTINTERP_API builtin_type_t btyp_mixed_numeric(builtin_type_t x, builtin_type_t y)
Determine the resulting type for a possible mixed-type operation.
Definition: ov-base.cc:65
OCTINTERP_API bool called_from_builtin(void)
Definition: ov-base.cc:1524
#define DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA
Definition: ov-base.h:184
bool btyp_isarray(builtin_type_t btyp)
Definition: ov-base.h:116
bool btyp_isfloat(builtin_type_t btyp)
Definition: ov-base.h:113
OCTINTERP_API octave_value make_idx_args(const std::string &type, const std::list< octave_value_list > &idx, const std::string &who)
Definition: ov-base.cc:1461
OCTINTERP_API bool Vsparse_auto_mutate
Definition: ov-base.cc:102
builtin_type_t
Definition: ov-base.h:83
@ btyp_float_complex
Definition: ov-base.h:87
@ btyp_cell
Definition: ov-base.h:99
@ btyp_func_handle
Definition: ov-base.h:100
@ btyp_double
Definition: ov-base.h:84
@ btyp_int32
Definition: ov-base.h:90
@ btyp_float
Definition: ov-base.h:85
@ btyp_struct
Definition: ov-base.h:98
@ btyp_uint16
Definition: ov-base.h:93
@ btyp_int64
Definition: ov-base.h:91
@ btyp_bool
Definition: ov-base.h:96
@ btyp_unknown
Definition: ov-base.h:101
@ btyp_uint64
Definition: ov-base.h:95
@ btyp_int16
Definition: ov-base.h:89
@ btyp_uint32
Definition: ov-base.h:94
@ btyp_num_types
Definition: ov-base.h:102
@ btyp_char
Definition: ov-base.h:97
@ btyp_uint8
Definition: ov-base.h:92
@ btyp_int8
Definition: ov-base.h:88
@ btyp_complex
Definition: ov-base.h:86
OCTINTERP_API type_info & __get_type_info__(void)
static const builtin_type_t btyp
Definition: ov-base.h:138
static float_display_format get_edit_display_format(const octave_value &val)