GNU Octave 7.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-2022 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
48OCTAVE_NAMESPACE_BEGIN
49
50 class stack_frame;
51 class type_info;
52
53OCTAVE_NAMESPACE_END
54
55class Cell;
56class float_format;
57class mxArray;
58class octave_map;
60class octave_function;
64
65#include "mxtypes.h"
66
67#include "oct-stream.h"
68#include "ov-base.h"
69
70class
71OCTINTERP_API
73{
74public:
75
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
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
291private:
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
301public:
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
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.
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
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
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
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
629 { return m_rep->matrix_type (); }
630
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
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
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
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 std::size_t nparents (void) const
1074 { return m_rep->nparents (); }
1075
1076 std::list<std::string> parent_class_name_list (void) const
1077 { return m_rep->parent_class_name_list (); }
1078
1080 { return m_rep->parent_class_names (); }
1081
1083 find_parent_class (const std::string& parent_class_name)
1084 { return m_rep->find_parent_class (parent_class_name); }
1085
1086 bool is_instance_of (const std::string& cls_name) const
1087 { return m_rep->is_instance_of (cls_name); }
1088
1089 OCTINTERP_API octave_classdef *
1090 classdef_object_value (bool silent = false) const;
1091
1092 OCTINTERP_API octave_function *
1093 function_value (bool silent = false) const;
1094
1095 OCTINTERP_API octave_user_function *
1096 user_function_value (bool silent = false) const;
1097
1098 OCTINTERP_API octave_user_script *
1099 user_script_value (bool silent = false) const;
1100
1101 OCTINTERP_API octave_user_code * user_code_value (bool silent = false) const;
1102
1103 OCTINTERP_API octave_fcn_handle *
1104 fcn_handle_value (bool silent = false) const;
1105
1106 OCTINTERP_API octave_value_list list_value (void) const;
1107
1108 OCTINTERP_API ColumnVector
1109 column_vector_value (bool frc_str_conv = false,
1110 bool frc_vec_conv = false) const;
1111
1112 OCTINTERP_API ComplexColumnVector
1113 complex_column_vector_value (bool frc_str_conv = false,
1114 bool frc_vec_conv = false) const;
1115
1116 OCTINTERP_API RowVector
1117 row_vector_value (bool frc_str_conv = false,
1118 bool frc_vec_conv = false) const;
1119
1120 OCTINTERP_API ComplexRowVector
1121 complex_row_vector_value (bool frc_str_conv = false,
1122 bool frc_vec_conv = false) const;
1123
1124 OCTINTERP_API FloatColumnVector
1125 float_column_vector_value (bool frc_str_conv = false,
1126 bool frc_vec_conv = false) const;
1127
1128 OCTINTERP_API FloatComplexColumnVector
1129 float_complex_column_vector_value (bool frc_str_conv = false,
1130 bool frc_vec_conv = false) const;
1131
1132 OCTINTERP_API FloatRowVector
1133 float_row_vector_value (bool frc_str_conv = false,
1134 bool frc_vec_conv = false) const;
1135
1136 OCTINTERP_API FloatComplexRowVector
1137 float_complex_row_vector_value (bool frc_str_conv = false,
1138 bool frc_vec_conv = false) const;
1139
1140 OCTINTERP_API Array<int>
1141 int_vector_value (bool req_int = false,
1142 bool frc_str_conv = false,
1143 bool frc_vec_conv = false) const;
1144
1145 OCTINTERP_API Array<octave_idx_type>
1146 octave_idx_type_vector_value (bool req_int = false,
1147 bool frc_str_conv = false,
1148 bool frc_vec_conv = false) const;
1149
1150 OCTINTERP_API Array<double>
1151 vector_value (bool frc_str_conv = false,
1152 bool frc_vec_conv = false) const;
1153
1154 OCTINTERP_API Array<Complex>
1155 complex_vector_value (bool frc_str_conv = false,
1156 bool frc_vec_conv = false) const;
1157
1158 OCTINTERP_API Array<float>
1159 float_vector_value (bool frc_str_conv = false,
1160 bool frc_vec_conv = false) const;
1161
1162 OCTINTERP_API Array<FloatComplex>
1163 float_complex_vector_value (bool frc_str_conv = false,
1164 bool frc_vec_conv = false) const;
1165
1166 // Extract values of specific types without any implicit type conversions.
1167 // Throw an error if an object is the wrong type for the requested value
1168 // extraction.
1169 //
1170 // These functions are intended to provide a simple way to extract values of
1171 // specific types and display error messages that are more meaningful than
1172 // the generic "error: wrong type argument 'cell'" message.
1173
1174 OCTINTERP_API short int xshort_value (const char *fmt, ...) const;
1175
1176 OCTINTERP_API unsigned short int xushort_value (const char *fmt, ...) const;
1177
1178 OCTINTERP_API int xint_value (const char *fmt, ...) const;
1179
1180 OCTINTERP_API unsigned int xuint_value (const char *fmt, ...) const;
1181
1182 OCTINTERP_API int xnint_value (const char *fmt, ...) const;
1183
1184 OCTINTERP_API long int xlong_value (const char *fmt, ...) const;
1185
1186 OCTINTERP_API unsigned long int xulong_value (const char *fmt, ...) const;
1187
1188 OCTINTERP_API int64_t xint64_value (const char *fmt, ...) const;
1189
1190 OCTINTERP_API uint64_t xuint64_value (const char *fmt, ...) const;
1191
1192 OCTINTERP_API octave_idx_type xidx_type_value (const char *fmt, ...) const;
1193
1194 OCTINTERP_API double xdouble_value (const char *fmt, ...) const;
1195
1196 OCTINTERP_API float xfloat_value (const char *fmt, ...) const;
1197
1198 OCTINTERP_API double xscalar_value (const char *fmt, ...) const;
1199
1200 OCTINTERP_API float xfloat_scalar_value (const char *fmt, ...) const;
1201
1202 OCTINTERP_API Matrix xmatrix_value (const char *fmt, ...) const;
1203
1204 OCTINTERP_API FloatMatrix xfloat_matrix_value (const char *fmt, ...) const;
1205
1206 OCTINTERP_API NDArray xarray_value (const char *fmt, ...) const;
1207
1208 OCTINTERP_API FloatNDArray xfloat_array_value (const char *fmt, ...) const;
1209
1210 OCTINTERP_API Complex xcomplex_value (const char *fmt, ...) const;
1211
1212 OCTINTERP_API FloatComplex xfloat_complex_value (const char *fmt, ...) const;
1213
1214 OCTINTERP_API ComplexMatrix
1215 xcomplex_matrix_value (const char *fmt, ...) const;
1216
1217 OCTINTERP_API FloatComplexMatrix
1218 xfloat_complex_matrix_value (const char *fmt, ...) const;
1219
1220 OCTINTERP_API ComplexNDArray
1221 xcomplex_array_value (const char *fmt, ...) const;
1222
1223 OCTINTERP_API FloatComplexNDArray
1224 xfloat_complex_array_value (const char *fmt, ...) const;
1225
1226 OCTINTERP_API bool xbool_value (const char *fmt, ...) const;
1227
1228 OCTINTERP_API boolMatrix xbool_matrix_value (const char *fmt, ...) const;
1229
1230 OCTINTERP_API boolNDArray xbool_array_value (const char *fmt, ...) const;
1231
1232 OCTINTERP_API charMatrix xchar_matrix_value (const char *fmt, ...) const;
1233
1234 OCTINTERP_API charNDArray xchar_array_value (const char *fmt, ...) const;
1235
1236 OCTINTERP_API SparseMatrix xsparse_matrix_value (const char *fmt, ...) const;
1237
1238 OCTINTERP_API SparseComplexMatrix
1239 xsparse_complex_matrix_value (const char *fmt, ...) const;
1240
1241 OCTINTERP_API SparseBoolMatrix
1242 xsparse_bool_matrix_value (const char *fmt, ...) const;
1243
1244 OCTINTERP_API DiagMatrix xdiag_matrix_value (const char *fmt, ...) const;
1245
1246 OCTINTERP_API FloatDiagMatrix
1247 xfloat_diag_matrix_value (const char *fmt, ...) const;
1248
1249 OCTINTERP_API ComplexDiagMatrix
1250 xcomplex_diag_matrix_value (const char *fmt, ...) const;
1251
1252 OCTINTERP_API FloatComplexDiagMatrix
1253 xfloat_complex_diag_matrix_value (const char *fmt, ...) const;
1254
1255 OCTINTERP_API PermMatrix xperm_matrix_value (const char *fmt, ...) const;
1256
1257 OCTINTERP_API octave_int8 xint8_scalar_value (const char *fmt, ...) const;
1258
1259 OCTINTERP_API octave_int16 xint16_scalar_value (const char *fmt, ...) const;
1260
1261 OCTINTERP_API octave_int32 xint32_scalar_value (const char *fmt, ...) const;
1262
1263 OCTINTERP_API octave_int64 xint64_scalar_value (const char *fmt, ...) const;
1264
1265 OCTINTERP_API octave_uint8 xuint8_scalar_value (const char *fmt, ...) const;
1266
1267 OCTINTERP_API octave_uint16 xuint16_scalar_value (const char *fmt, ...) const;
1268
1269 OCTINTERP_API octave_uint32 xuint32_scalar_value (const char *fmt, ...) const;
1270
1271 OCTINTERP_API octave_uint64 xuint64_scalar_value (const char *fmt, ...) const;
1272
1273 OCTINTERP_API int8NDArray xint8_array_value (const char *fmt, ...) const;
1274
1275 OCTINTERP_API int16NDArray xint16_array_value (const char *fmt, ...) const;
1276
1277 OCTINTERP_API int32NDArray xint32_array_value (const char *fmt, ...) const;
1278
1279 OCTINTERP_API int64NDArray xint64_array_value (const char *fmt, ...) const;
1280
1281 OCTINTERP_API uint8NDArray xuint8_array_value (const char *fmt, ...) const;
1282
1283 OCTINTERP_API uint16NDArray xuint16_array_value (const char *fmt, ...) const;
1284
1285 OCTINTERP_API uint32NDArray xuint32_array_value (const char *fmt, ...) const;
1286
1287 OCTINTERP_API uint64NDArray xuint64_array_value (const char *fmt, ...) const;
1288
1289 OCTINTERP_API std::string xstring_value (const char *fmt, ...) const;
1290
1291 OCTINTERP_API string_vector xstring_vector_value (const char *fmt, ...) const;
1292
1293 OCTINTERP_API Cell xcell_value (const char *fmt, ...) const;
1294
1295 OCTINTERP_API Array<std::string> xcellstr_value (const char *fmt, ...) const;
1296
1297 OCTINTERP_API octave::range<double>
1298 xrange_value (const char *fmt, ...) const;
1299
1300 // For now, disable all but range<double>.
1301
1302#if 0
1303
1304 OCTINTERP_API octave::range<float>
1305 xfloat_range_value (const char *fmt, ...) const;
1306
1307 OCTINTERP_API octave::range<octave_int8>
1308 xint8_range_value (const char *fmt, ...) const;
1309
1310 OCTINTERP_API octave::range<octave_int16>
1311 xint16_range_value (const char *fmt, ...) const;
1312
1313 OCTINTERP_API octave::range<octave_int32>
1314 xint32_range_value (const char *fmt, ...) const;
1315
1316 OCTINTERP_API octave::range<octave_int64>
1317 xint64_range_value (const char *fmt, ...) const;
1318
1319 OCTINTERP_API octave::range<octave_uint8>
1320 xuint8_range_value (const char *fmt, ...) const;
1321
1322 OCTINTERP_API octave::range<octave_uint16>
1323 xuint16_range_value (const char *fmt, ...) const;
1324
1325 OCTINTERP_API octave::range<octave_uint32>
1326 xuint32_range_value (const char *fmt, ...) const;
1327
1328 OCTINTERP_API octave::range<octave_uint64>
1329 xuint64_range_value (const char *fmt, ...) const;
1330
1331#endif
1332
1333 OCTINTERP_API octave_map xmap_value (const char *fmt, ...) const;
1334
1335 OCTINTERP_API octave_scalar_map
1336 xscalar_map_value (const char *fmt, ...) const;
1337
1338 OCTINTERP_API ColumnVector xcolumn_vector_value (const char *fmt, ...) const;
1339
1340 OCTINTERP_API ComplexColumnVector
1341 xcomplex_column_vector_value (const char *fmt, ...) const;
1342
1343 OCTINTERP_API RowVector xrow_vector_value (const char *fmt, ...) const;
1344
1345 OCTINTERP_API ComplexRowVector
1346 xcomplex_row_vector_value (const char *fmt, ...) const;
1347
1348 OCTINTERP_API FloatColumnVector
1349 xfloat_column_vector_value (const char *fmt, ...) const;
1350
1351 OCTINTERP_API FloatComplexColumnVector
1352 xfloat_complex_column_vector_value (const char *fmt, ...) const;
1353
1354 OCTINTERP_API FloatRowVector
1355 xfloat_row_vector_value (const char *fmt, ...) const;
1356
1357 OCTINTERP_API FloatComplexRowVector
1358 xfloat_complex_row_vector_value (const char *fmt, ...) const;
1359
1360 OCTINTERP_API Array<int> xint_vector_value (const char *fmt, ...) const;
1361
1362 OCTINTERP_API Array<octave_idx_type>
1363 xoctave_idx_type_vector_value (const char *fmt, ...) const;
1364
1365 OCTINTERP_API Array<double> xvector_value (const char *fmt, ...) const;
1366
1367 OCTINTERP_API Array<Complex>
1368 xcomplex_vector_value (const char *fmt, ...) const;
1369
1370 OCTINTERP_API Array<float> xfloat_vector_value (const char *fmt, ...) const;
1371
1372 OCTINTERP_API Array<FloatComplex>
1373 xfloat_complex_vector_value (const char *fmt, ...) const;
1374
1375 OCTINTERP_API octave_function * xfunction_value (const char *fmt, ...) const;
1376
1377 OCTINTERP_API octave_user_function *
1378 xuser_function_value (const char *fmt, ...) const;
1379
1380 OCTINTERP_API octave_user_script *
1381 xuser_script_value (const char *fmt, ...) const;
1382
1383 OCTINTERP_API octave_user_code *
1384 xuser_code_value (const char *fmt, ...) const;
1385
1386 OCTINTERP_API octave_fcn_handle *
1387 xfcn_handle_value (const char *fmt, ...) const;
1388
1389 OCTINTERP_API octave_value_list xlist_value (const char *fmt, ...) const;
1390
1391 // Possibly economize a lazy-indexed value.
1392
1394 { m_rep->maybe_economize (); }
1395
1396 // The following two hook conversions are called on any octave_value prior to
1397 // storing it to a "permanent" location, like a named variable, a cell or a
1398 // struct component, or a return value of a function.
1399
1400 OCTINTERP_API octave_value storable_value (void) const;
1401
1402 // Ditto, but in place, i.e., equivalent to *this = this->storable_value (),
1403 // but possibly more efficient.
1404
1405 OCTINTERP_API void make_storable_value (void);
1406
1407 // FIXME: These should probably be private.
1408 // Conversions. If a user of this class wants a certain kind of constant,
1409 // he should simply ask for it, and we should convert it if possible.
1410
1411 octave_value convert_to_str (bool pad = false, bool force = false,
1412 char type = '\'') const
1413 { return m_rep->convert_to_str (pad, force, type); }
1414
1416 convert_to_str_internal (bool pad, bool force, char type) const
1417 { return m_rep->convert_to_str_internal (pad, force, type); }
1418
1420 { m_rep->convert_to_row_or_column_vector (); }
1421
1422 bool print_as_scalar (void) const
1423 { return m_rep->print_as_scalar (); }
1424
1425 void print (std::ostream& os, bool pr_as_read_syntax = false)
1426 { m_rep->print (os, pr_as_read_syntax); }
1427
1428 void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const
1429 { m_rep->print_raw (os, pr_as_read_syntax); }
1430
1431 bool print_name_tag (std::ostream& os, const std::string& name) const
1432 { return m_rep->print_name_tag (os, name); }
1433
1434 void print_with_name (std::ostream& os, const std::string& name) const
1435 { m_rep->print_with_name (os, name, true); }
1436
1437 void short_disp (std::ostream& os) const { m_rep->short_disp (os); }
1438
1440
1441 std::string edit_display (const float_display_format& fmt,
1443 {
1444 return m_rep->edit_display (fmt, i, j);
1445 }
1446
1447 int type_id (void) const { return m_rep->type_id (); }
1448
1449 std::string type_name (void) const { return m_rep->type_name (); }
1450
1451 std::string class_name (void) const { return m_rep->class_name (); }
1452
1453 // Unary operations that are member functions. There are also some
1454 // non-member functions for unary and binary operations declared
1455 // below, outside of the octave_value class declaration.
1456
1458
1459#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
1460 OCTAVE_DEPRECATED (7, "use 'octave_value::non_const_unary_op' instead")
1461 octave_value& do_non_const_unary_op (unary_op op)
1462 {
1463 return non_const_unary_op (op);
1464 }
1465#endif
1466
1467 OCTINTERP_API octave_value&
1468 non_const_unary_op (unary_op op, const std::string& type,
1469 const std::list<octave_value_list>& idx);
1470
1471#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
1472 OCTAVE_DEPRECATED (7, "use 'octave_value::non_const_unary_op' instead")
1473 octave_value& do_non_const_unary_op (unary_op op, const std::string& type,
1474 const std::list<octave_value_list>& idx)
1475 {
1476 return non_const_unary_op (op, type, idx);
1477 }
1478#endif
1479
1480 const octave_base_value& get_rep (void) const { return *m_rep; }
1481
1482 bool is_copy_of (const octave_value& val) const { return m_rep == val.m_rep; }
1483
1484 OCTINTERP_API void
1485 print_info (std::ostream& os, const std::string& prefix = "") const;
1486
1487 bool save_ascii (std::ostream& os) { return m_rep->save_ascii (os); }
1488
1489 OCTINTERP_API bool load_ascii (std::istream& is);
1490
1491 bool save_binary (std::ostream& os, bool save_as_floats)
1492 { return m_rep->save_binary (os, save_as_floats); }
1493
1494 OCTINTERP_API bool load_binary (std::istream& is, bool swap,
1496
1497 bool save_hdf5 (octave_hdf5_id loc_id, const char *name,
1498 bool save_as_floats)
1499 { return m_rep->save_hdf5 (loc_id, name, save_as_floats); }
1500
1501 OCTINTERP_API bool load_hdf5 (octave_hdf5_id loc_id, const char *name);
1502
1503 OCTINTERP_API int
1504 write (octave::stream& os, int block_size,
1505 oct_data_conv::data_type output_type, int skip,
1506 octave::mach_info::float_format flt_fmt) const;
1507
1508 octave_base_value * internal_rep (void) const { return m_rep; }
1509
1510 // These functions exist to support the MEX interface.
1511 // You should not use them anywhere else.
1512
1513 OCTINTERP_API const void *
1514 mex_get_data (mxClassID class_id = mxUNKNOWN_CLASS,
1515 mxComplexity complexity = mxREAL) const;
1516
1517 const octave_idx_type * mex_get_ir (void) const
1518 {
1519 return m_rep->mex_get_ir ();
1520 }
1521
1522 const octave_idx_type *
1523 mex_get_jc (void) const
1524 {
1525 return m_rep->mex_get_jc ();
1526 }
1527
1528 mxArray * as_mxArray (bool interleaved = false) const
1529 { return m_rep->as_mxArray (interleaved); }
1530
1532 { return m_rep->diag (k); }
1533
1535 { return m_rep->diag (m, n); }
1536
1538 { return m_rep->sort (dim, mode); }
1540 sortmode mode = ASCENDING) const
1541 { return m_rep->sort (sidx, dim, mode); }
1542
1544 { return m_rep->issorted (mode); }
1545
1547 { return m_rep->sort_rows_idx (mode); }
1548
1550 { return m_rep->is_sorted_rows (mode); }
1551
1552 void lock (void) { m_rep->lock (); }
1553
1554 void unlock (void) { m_rep->unlock (); }
1555
1556 bool islocked (void) const { return m_rep->islocked (); }
1557
1558 void call_object_destructor (void) { return m_rep->call_object_destructor (); }
1559
1560 octave_value dump (void) const { return m_rep->dump (); }
1561
1562#define MAPPER_FORWARD(F) \
1563 octave_value F (void) const \
1564 { \
1565 return m_rep->map (octave_base_value::umap_ ## F); \
1566 }
1567
1613
1614 // These functions are prefixed with X to avoid potential macro conflicts.
1615
1627 MAPPER_FORWARD (xisxdigit)
1631
1632#undef MAPPER_FORWARD
1633
1635 { return m_rep->map (umap); }
1636
1637 //! Extract the n-th element, aka 'val(n)'.
1638 //!
1639 //! @return Result is undefined if 'val' is not an array type
1640 //! or @p n is out of range.
1641 //!
1642 //! @warning Function calls should never error.
1643
1646 { return m_rep->fast_elem_extract (n); }
1647
1648 //! Assign the n-th element, aka 'val(n) = x'.
1649 //!
1650 //! @returns false if 'val' is not an array type,
1651 //! @p x is not a matching scalar type,
1652 //! or @p n is out of range.
1653 //!
1654 //! @warning Function calls should never error.
1655
1656 bool
1658 {
1659 make_unique ();
1660 return m_rep->fast_elem_insert (n, x);
1661 }
1662
1663protected:
1664
1665 //! The real representation.
1667
1668private:
1669
1670 static OCTINTERP_API octave_base_value * nil_rep (void);
1671
1673
1675
1676 // This declaration protects against constructing octave_value from
1677 // const octave_base_value* which actually silently calls octave_value (bool).
1678 OCTINTERP_API octave_value (const octave_base_value *);
1679
1680};
1681
1682// Non-member unary and binary operations on octave_value objects.
1683
1684OCTAVE_NAMESPACE_BEGIN
1685
1686 extern OCTINTERP_API octave_value
1688 const octave_value& a);
1689
1690 extern OCTINTERP_API octave_value
1692
1693 extern OCTINTERP_API octave_value
1695 const octave_value& a, const octave_value& b);
1696
1697 extern OCTINTERP_API octave_value
1699 const octave_value& a, const octave_value& b);
1700
1701 extern OCTINTERP_API octave_value
1703 const octave_value& b);
1704
1705 extern OCTINTERP_API octave_value
1707 const octave_value& b);
1708
1709 extern OCTINTERP_API octave_value
1711 const octave_value& b, const Array<octave_idx_type>& ra_idx);
1712
1713 extern OCTINTERP_API octave_value
1714 cat_op (const octave_value& a, const octave_value& b,
1716
1717 extern OCTINTERP_API octave_value
1718 colon_op (const octave_value& base, const octave_value& increment,
1719 const octave_value& limit, bool is_for_cmd_expr = false);
1720
1721 inline octave_value
1722 colon_op (const octave_value& base, const octave_value& limit,
1723 bool is_for_cmd_expr = false)
1724 {
1725 // Note, we need to pass an undefined octave_value object instead of
1726 // octave_value (1.0) so that we can properly detect the
1727 // two-argument case and correctly pass just two arguments to any
1728 // user-defined function that is provided if either base or limit is
1729 // an object.
1730
1731 return colon_op (base, octave_value (), limit, is_for_cmd_expr);
1732 }
1733
1734OCTAVE_NAMESPACE_END
1735
1736#if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
1737OCTAVE_DEPRECATED (7, "use 'octave::unary_op' instead")
1738inline octave_value
1739do_unary_op (octave::type_info& ti, octave_value::unary_op op,
1740 const octave_value& a)
1741{
1742 return octave::unary_op (ti, op, a);
1743}
1744
1745OCTAVE_DEPRECATED (7, "use 'octave::unary_op' instead")
1746inline octave_value
1747do_unary_op (octave_value::unary_op op, const octave_value& a)
1748{
1749 return octave::unary_op (op, a);
1750}
1751
1752OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1753inline octave_value
1754do_binary_op (octave::type_info& ti, octave_value::binary_op op,
1755 const octave_value& a, const octave_value& b)
1756{
1757 return octave::binary_op (ti, op, a, b);
1758}
1759
1760OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1761inline octave_value
1762do_binary_op (octave::type_info& ti, octave_value::compound_binary_op op,
1763 const octave_value& a, const octave_value& b)
1764{
1765 return octave::binary_op (ti, op, a, b);
1766}
1767
1768OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1769inline octave_value
1770do_binary_op (octave_value::binary_op op, const octave_value& a,
1771 const octave_value& b)
1772{
1773 return octave::binary_op (op, a, b);
1774}
1775
1776OCTAVE_DEPRECATED (7, "use 'octave::binary_op' instead")
1777inline octave_value
1778do_binary_op (octave_value::compound_binary_op op, const octave_value& a,
1779 const octave_value& b)
1780{
1781 return octave::binary_op (op, a, b);
1782}
1783
1784OCTAVE_DEPRECATED (7, "use 'octave::cat_op' instead")
1785inline octave_value
1786do_cat_op (octave::type_info& ti, const octave_value& a,
1787 const octave_value& b, const Array<octave_idx_type>& ra_idx)
1788{
1789 return octave::cat_op (ti, a, b, ra_idx);
1790}
1791
1792OCTAVE_DEPRECATED (7, "use 'octave::cat_op' instead")
1793inline octave_value
1794do_cat_op (const octave_value& a, const octave_value& b,
1796{
1797 return octave::cat_op (a, b, ra_idx);
1798}
1799
1800OCTAVE_DEPRECATED (7, "use 'octave::colon_op' instead")
1801inline octave_value
1802do_colon_op (const octave_value& base, const octave_value& increment,
1803 const octave_value& limit, bool is_for_cmd_expr = false)
1804{
1805 return octave::colon_op (base, increment, limit, is_for_cmd_expr);
1806}
1807
1808OCTAVE_DEPRECATED (7, "use 'octave::colon_op' instead")
1809inline octave_value
1810do_colon_op (const octave_value& base, const octave_value& limit,
1811 bool is_for_cmd_expr = false)
1812{
1813 return octave::colon_op (base, limit, is_for_cmd_expr);
1814}
1815#endif
1816
1817#define OV_UNOP_FN(name) \
1818 inline octave_value \
1819 name (const octave_value& a) \
1820 { \
1821 return octave::unary_op (octave_value::name, a); \
1822 }
1823
1824#define OV_UNOP_OP(name, op) \
1825 inline octave_value \
1826 operator op (const octave_value& a) \
1827 { \
1828 return name (a); \
1829 }
1830
1831#define OV_UNOP_FN_OP(name, op) \
1832 OV_UNOP_FN (name) \
1833 OV_UNOP_OP (name, op)
1834
1838
1841
1842// No simple way to define these for prefix and suffix ops?
1843//
1844// incr
1845// decr
1846
1847#define OV_BINOP_FN(name) \
1848 inline octave_value \
1849 name (const octave_value& a1, const octave_value& a2) \
1850 { \
1851 return octave::binary_op (octave_value::name, a1, a2); \
1852 }
1853
1854#define OV_BINOP_OP(name, op) \
1855 inline octave_value \
1856 operator op (const octave_value& a1, const octave_value& a2) \
1857 { \
1858 return name (a1, a2); \
1859 }
1860
1861#define OV_BINOP_FN_OP(name, op) \
1862 OV_BINOP_FN (name) \
1863 OV_BINOP_OP (name, op)
1864
1869
1872
1879
1886
1888
1889#define OV_COMP_BINOP_FN(name) \
1890 inline octave_value \
1891 name (const octave_value& a1, const octave_value& a2) \
1892 { \
1893 return octave::binary_op (octave_value::name, a1, a2); \
1894 }
1895
1900
1901extern OCTINTERP_API void install_types (octave::type_info&);
1902
1903// Templated value extractors.
1904template <typename Value>
1906{ assert (false); }
1907
1908#define DEF_VALUE_EXTRACTOR(VALUE,MPREFIX) \
1909 template <> \
1910 inline VALUE octave_value_extract<VALUE> (const octave_value& v) \
1911 { \
1912 return v.MPREFIX ## _value (); \
1913 }
1914
1916DEF_VALUE_EXTRACTOR (float, float_scalar)
1920
1929
1935
1945
1951
1955DEF_VALUE_EXTRACTOR (FloatComplexColumnVector, float_complex_column_vector)
1956
1961
1967
1971#undef DEF_VALUE_EXTRACTOR
1972
1973#define DEF_DUMMY_VALUE_EXTRACTOR(VALUE,DEFVAL) \
1974 template <> \
1975 inline VALUE octave_value_extract<VALUE> (const octave_value&) \
1976 { \
1977 assert (false); \
1978 return DEFVAL; \
1979 }
1980
1983#undef DEF_DUMMY_VALUE_EXTRACTOR
1984
1985#endif
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:217
#define C(a, b)
Definition: Faddeeva.cc:259
size_type size(const size_type d) const
Size of the specified dimension.
Definition: Array.h:476
OCTARRAY_API Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Sort by rows returns only indices.
Definition: Array.cc:2059
Definition: Cell.h:43
Definition: dMatrix.h:42
Definition: Range.h:400
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:94
octave::refcount< octave_idx_type > count
Definition: ov-base.h:906
virtual octave_base_value * try_narrowing_conversion(void)
Definition: ov-base.h:305
virtual octave_base_value * empty_clone(void) const
Definition: ov-base.cc:106
virtual octave_base_value * find_parent_class(const std::string &)
Definition: ov-base.h:672
virtual octave_base_value * unique_clone(void)
Definition: ov-base.h:276
octave_value_list & operator=(const octave_value_list &obj)=default
bool is_function(void) const
Definition: ov.h:822
octave_value(octave_value &&a)
Definition: ov.h:381
void maybe_economize(void)
Definition: ov.h:1393
OCTINTERP_API assign_op unary_op_to_assign_op(unary_op op)
MatrixType matrix_type(void) const
Definition: ov.h:628
octave_value eval(void)
Definition: ov.h:847
OCTINTERP_API Array< octave_idx_type > xoctave_idx_type_vector_value(const char *fmt,...) const
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:1539
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::range< double > xrange_value(const char *fmt,...) const
OCTINTERP_API Array< FloatComplex > xfloat_complex_vector_value(const char *fmt,...) const
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
Definition: ov.h:1428
int32NDArray int32_array_value(void) const
Definition: ov.h:1001
bool iscellstr(void) const
Definition: ov.h:652
OCTINTERP_API const void * mex_get_data(mxClassID class_id=mxUNKNOWN_CLASS, mxComplexity complexity=mxREAL) const
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)
static OCTINTERP_API octave_base_value * make_range_rep_deprecated(double base, double inc, double limit)
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 Array< double > vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API int64NDArray xint64_array_value(const char *fmt,...) const
bool is_dld_function(void) const
Definition: ov.h:837
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
OCTINTERP_API ColumnVector xcolumn_vector_value(const char *fmt,...) const
octave_value convert_to_str_internal(bool pad, bool force, char type) const
Definition: ov.h:1416
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:1657
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 octave_function * function_value(bool silent=false) 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:1086
OCTINTERP_API octave_scalar_map xscalar_map_value(const char *fmt,...) const
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:1434
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:1447
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_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 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
octave_value diag(octave_idx_type m, octave_idx_type n) const
Definition: ov.h:1534
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 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
OCTINTERP_API octave_fcn_handle * fcn_handle_value(bool silent=false) const
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:1076
bool is_classdef_superclass_ref(void) const
Definition: ov.h:703
void short_disp(std::ostream &os) const
Definition: ov.h:1437
OCTINTERP_API octave_value(const octave_int32 &i)
OCTINTERP_API octave_user_function * user_function_value(bool silent=false) const
octave_base_value * try_narrowing_conversion(void)
Definition: ov.h:507
bool is_builtin_function(void) const
Definition: ov.h:834
OCTINTERP_API FloatMatrix xfloat_matrix_value(const char *fmt,...) const
OCTINTERP_API octave_function * xfunction_value(const char *fmt,...) const
octave_value dump(void) const
Definition: ov.h:1560
Complex complex_value(bool frc_str_conv=false) const
Definition: ov.h:910
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Definition: ov.h:1546
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
static OCTINTERP_API octave_base_value * make_range_rep_deprecated(const Range &r, bool force_range)
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:1497
OCTINTERP_API Array< std::string > xcellstr_value(const char *fmt,...) const
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:1537
octave_value ipermute(const Array< int > &vec) const
Definition: ov.h:622
bool is_cs_list(void) const
Definition: ov.h:715
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:1422
const octave_idx_type * mex_get_ir(void) const
Definition: ov.h:1517
void convert_to_row_or_column_vector(void)
Definition: ov.h:1419
bool is_string(void) const
Definition: ov.h:682
octave_base_value * empty_clone(void) const
Definition: ov.h:391
octave_base_value * find_parent_class(const std::string &parent_class_name)
Definition: ov.h:1083
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 Array< int > xint_vector_value(const char *fmt,...) const
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:1482
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)
std::string edit_display(const float_display_format &fmt, octave_idx_type i, octave_idx_type j) const
Definition: ov.h:1441
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:1558
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:1491
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
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:1487
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:1451
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 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 string_vector xstring_vector_value(const char *fmt,...) const
OCTINTERP_API Array< int > int_vector_value(bool req_int=false, bool frc_str_conv=false, bool frc_vec_conv=false) 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
const octave_idx_type * mex_get_jc(void) const
Definition: ov.h:1523
OCTINTERP_API octave_fcn_handle * xfcn_handle_value(const char *fmt,...) const
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
OCTINTERP_API octave_classdef * classdef_object_value(bool silent=false) const
octave_value reshape(const dim_vector &dv) const
Definition: ov.h:616
bool islocked(void) const
Definition: ov.h:1556
octave_value as_int16(void) const
Definition: ov.h:498
OCTINTERP_API Array< FloatComplex > float_complex_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API octave_value & non_const_unary_op(unary_op op, const std::string &type, const std::list< octave_value_list > &idx)
double scalar_value(bool frc_str_conv=false) const
Definition: ov.h:892
octave_value as_uint8(void) const
Definition: ov.h:502
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
OCTINTERP_API Array< float > xfloat_vector_value(const char *fmt,...) const
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
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
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:1645
OCTINTERP_API octave_value & assign(assign_op op, const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
void unlock(void)
Definition: ov.h:1554
magic_colon
Definition: ov.h:168
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:1552
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)
OCTINTERP_API Array< Complex > complex_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
bool is_mex_function(void) const
Definition: ov.h:840
FloatMatrix float_matrix_value(bool frc_str_conv=false) const
Definition: ov.h:901
OCTINTERP_API Array< Complex > xcomplex_vector_value(const char *fmt,...) const
string_vector parent_class_names(void) const
Definition: ov.h:1079
OCTINTERP_API octave_value(const Array< octave_uint64 > &inda)
bool isjava(void) const
Definition: ov.h:712
Array< std::string > cellstr_value(void) const
Definition: ov.h:1027
bool is_matrix_type(void) const
Definition: ov.h:792
octave_value map(octave_base_value::unary_mapper_t umap) const
Definition: ov.h:1634
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 Array< double > xvector_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:1549
mxArray * as_mxArray(bool interleaved=false) const
Definition: ov.h:1528
octave::range< double > range_value(void) const
Definition: ov.h:1030
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 Array< float > float_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API octave_value(const Array< octave_int16 > &inda)
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
OCTINTERP_API octave_value & non_const_unary_op(unary_op op)
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 octave_user_code * xuser_code_value(const char *fmt,...) const
octave_base_value * internal_rep(void) const
Definition: ov.h:1508
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:1411
const octave_base_value & get_rep(void) const
Definition: ov.h:1480
bool print_name_tag(std::ostream &os, const std::string &name) const
Definition: ov.h:1431
sortmode issorted(sortmode mode=UNSORTED) const
Definition: ov.h:1543
OCTINTERP_API ComplexColumnVector complex_column_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:1666
OCTINTERP_API octave_value(const Array< std::string > &cellstr)
OCTINTERP_API uint8NDArray xuint8_array_value(const char *fmt,...) const
OCTINTERP_API unsigned int xuint_value(const char *fmt,...) const
bool is_sq_string(void) const
Definition: ov.h:685
std::size_t nparents(void) const
Definition: ov.h:1073
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)
OCTINTERP_API octave_user_code * user_code_value(bool silent=false) const
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 octave_value & assign(assign_op, const octave_value &rhs)
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
bool is_user_function(void) const
Definition: ov.h:828
bool is_uint8_type(void) const
Definition: ov.h:763
int16NDArray int16_array_value(void) const
Definition: ov.h:998
MatrixType matrix_type(const MatrixType &typ) const
Definition: ov.h:631
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:1425
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:1531
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 octave_base_value * clone(void) 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 octave_user_script * user_script_value(bool silent=false) const
OCTINTERP_API void print_info(std::ostream &os, const std::string &prefix="") const
std::string type_name(void) const
Definition: ov.h:1449
bool is_legacy_object(void) const
Definition: ov.h:643
bool islogical(void) const
Definition: ov.h:780
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 octave_user_function * xuser_function_value(const char *fmt,...) const
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_user_script * xuser_script_value(const char *fmt,...) const
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
function gamma(X)
Definition: gamma.f:3
QString name
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
F77_RET_T const F77_DBLE * x
std::complex< double > erfi(std::complex< double > z, double relerr=0)
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 > erf(std::complex< double > z, double relerr=0)
double fix(double x)
Definition: lo-mappers.h:118
Complex atan(const Complex &x)
Definition: lo-mappers.h:71
double signum(double x)
Definition: lo-mappers.h:229
double asinh(double x)
Definition: lo-specfun.h:58
bool isna(double x)
Definition: lo-mappers.cc:47
double atanh(double x)
Definition: lo-specfun.h:63
bool isfinite(double x)
Definition: lo-mappers.h:192
double roundb(double x)
Definition: lo-mappers.h:147
bool isnan(bool)
Definition: lo-mappers.h:178
Complex log1p(const Complex &x)
Definition: lo-specfun.cc:1958
bool isinf(double x)
Definition: lo-mappers.h:203
Complex acos(const Complex &x)
Definition: lo-mappers.cc:85
double round(double x)
Definition: lo-mappers.h:136
Complex asin(const Complex &x)
Definition: lo-mappers.cc:107
double acosh(double x)
Definition: lo-specfun.h:40
double erfcinv(double x)
Definition: lo-specfun.cc:1744
double lgamma(double x)
Definition: lo-specfun.h:336
double erfinv(double x)
Definition: lo-specfun.cc:1863
std::complex< T > ceil(const std::complex< T > &x)
Definition: lo-mappers.h:103
std::complex< T > floor(const std::complex< T > &x)
Definition: lo-mappers.h:130
double dawson(double x)
Definition: lo-specfun.cc:1517
double cbrt(double x)
Definition: lo-specfun.h:289
Complex log2(const Complex &x)
Definition: lo-mappers.cc:139
Complex expm1(const Complex &x)
Definition: lo-specfun.cc:1874
STL namespace.
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:75
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:1878
octave_value op_el_ldiv(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1883
octave_value op_uplus(const octave_value &a)
Definition: ov.h:1836
octave_value op_add(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1865
octave_value op_gt(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1877
octave_value op_uminus(const octave_value &a)
Definition: ov.h:1837
octave_value op_el_div(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1881
#define DEF_DUMMY_VALUE_EXTRACTOR(VALUE, DEFVAL)
Definition: ov.h:1973
octave_value op_mul_herm(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1899
octave_value op_transpose(const octave_value &a)
Definition: ov.h:1839
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:1885
octave_value op_sub(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1866
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:1867
OCTAVE_NAMESPACE_BEGIN OCTINTERP_API octave_value unary_op(type_info &ti, octave_value::unary_op op, const octave_value &a)
octave_value op_hermitian(const octave_value &a)
Definition: ov.h:1840
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:1889
octave_value op_le(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1874
octave_value op_el_and(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1884
octave_value op_herm_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1898
#define MAPPER_FORWARD(F)
Definition: ov.h:1562
octave_value op_eq(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1875
octave_value op_el_pow(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1882
#define OV_UNOP_FN_OP(name, op)
Definition: ov.h:1831
#define DEF_VALUE_EXTRACTOR(VALUE, MPREFIX)
Definition: ov.h:1908
octave_value op_struct_ref(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1887
octave_value op_not(const octave_value &a)
Definition: ov.h:1835
#define OV_BINOP_FN(name)
Definition: ov.h:1847
octave_value op_ldiv(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1871
#define OV_UNOP_FN(name)
Definition: ov.h:1817
Value octave_value_extract(const octave_value &)
Definition: ov.h:1905
octave_value op_pow(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1870
octave_value op_ge(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1876
octave_value op_el_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1880
octave_value op_div(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1868
octave_value op_trans_mul(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1896
octave_value op_mul_trans(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1897
#define OV_BINOP_FN_OP(name, op)
Definition: ov.h:1861
octave_value op_lt(const octave_value &a1, const octave_value &a2)
Definition: ov.h:1873
static T abs(T x)
Definition: pr-output.cc:1678