26 #if defined (HAVE_CONFIG_H)
32 #include <type_traits>
507 #if defined (OCTAVE_HAVE_LONG_LONG_INT)
513 #if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT)
862 : m_rep (new octave_int8_scalar (i))
868 : m_rep (new octave_uint8_scalar (i))
874 : m_rep (new octave_int16_scalar (i))
880 : m_rep (new octave_uint16_scalar (i))
886 : m_rep (new octave_int32_scalar (i))
892 : m_rep (new octave_uint32_scalar (i))
898 : m_rep (new octave_int64_scalar (i))
910 : m_rep (new octave_int8_matrix (inda))
916 : m_rep (new octave_int8_matrix (inda))
922 : m_rep (new octave_uint8_matrix (inda))
928 : m_rep (new octave_uint8_matrix (inda))
934 : m_rep (new octave_int16_matrix (inda))
940 : m_rep (new octave_int16_matrix (inda))
946 : m_rep (new octave_uint16_matrix (inda))
952 : m_rep (new octave_uint16_matrix (inda))
958 : m_rep (new octave_int32_matrix (inda))
964 : m_rep (new octave_int32_matrix (inda))
970 : m_rep (new octave_uint32_matrix (inda))
976 : m_rep (new octave_uint32_matrix (inda))
982 : m_rep (new octave_int64_matrix (inda))
988 : m_rep (new octave_int64_matrix (inda))
1016 octave::range<double>
range;
1019 octave::idx_vector::idx_class_type idx_class;
1024 switch (idx.idx_class ())
1026 case octave::idx_vector::class_range:
1027 case octave::idx_vector::class_vector:
1037 idx.unconvert (idx_class,
scalar,
range, array, mask);
1041 case octave::idx_vector::class_colon:
1045 case octave::idx_vector::class_range:
1049 case octave::idx_vector::class_scalar:
1053 case octave::idx_vector::class_vector:
1057 case octave::idx_vector::class_mask:
1080 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
1081 # pragma GCC diagnostic push
1082 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1088 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
1089 # pragma GCC diagnostic pop
1097 if (! force_range && !
r.ok ())
1098 error (
"invalid range");
1201 : m_rep (force_range || optimize_range
1207 : m_rep (type ==
'"'
1232 const std::list<std::string>& plist)
1239 const std::list<std::string>& plist)
1296 if (tmp && tmp !=
m_rep)
1307 DEFUN (
double, args, ,
1314 if (args.length () != 1)
1351 DEFUN (single, args, ,
1358 if (args.length () != 1)
1361 return args(0).as_single ();
1392 DEFUN (int8, args, ,
1399 if (args.length () != 1)
1402 return args(0).as_int8 ();
1414 DEFUN (int16, args, ,
1421 if (args.length () != 1)
1424 return args(0).as_int16 ();
1436 DEFUN (int32, args, ,
1443 if (args.length () != 1)
1446 return args(0).as_int32 ();
1458 DEFUN (int64, args, ,
1465 if (args.length () != 1)
1468 return args(0).as_int64 ();
1480 DEFUN (uint8, args, ,
1487 if (args.length () != 1)
1490 return args(0).as_uint8 ();
1502 DEFUN (uint16, args, ,
1509 if (args.length () != 1)
1512 return args(0).as_uint16 ();
1524 DEFUN (uint32, args, ,
1531 if (args.length () != 1)
1534 return args(0).as_uint32 ();
1546 DEFUN (uint64, args, ,
1553 if (args.length () != 1)
1556 return args(0).as_uint64 ();
1574 std::list<octave_value_list> i;
1583 const std::list<octave_value_list>& idx,
int nargout)
1590 const std::list<octave_value_list>& idx,
1593 if (idx.size () > skip)
1595 std::list<octave_value_list> new_idx (idx);
1596 for (std::size_t i = 0; i < skip; i++)
1597 new_idx.erase (new_idx.begin ());
1598 return subsref (type.substr (skip), new_idx);
1606 const std::list<octave_value_list>& idx,
1609 if (idx.size () > skip)
1611 std::list<octave_value_list> new_idx (idx);
1612 for (std::size_t i = 0; i < skip; i++)
1613 new_idx.erase (new_idx.begin ());
1614 return subsref (type.substr (skip), new_idx, nargout);
1622 const std::list<octave_value_list>& idx,
1625 if (idx.size () > skip)
1627 std::list<octave_value_list> new_idx (idx);
1628 for (std::size_t i = 0; i < skip; i++)
1629 new_idx.erase (new_idx.begin ());
1630 return subsref (type.substr (skip), new_idx, auto_add);
1638 const std::list<octave_value_list>& idx,
1646 const std::list<octave_value_list>& idx,
1654 const std::list<octave_value_list>& idx,
1664 error (
"in computed assignment A(index) OP= X, A must be defined first");
1673 *
this =
subsasgn (type, idx, t_rhs);
1696 f = ti.lookup_assign_op (op, tthis, trhs);
1716 error (
"in computed assignment A OP= X, A must be defined first");
1748 for (
int i = 0; i < dv.
ndims (); i++)
1766 bool retval =
false;
1798 #if defined (OCTAVE_ENABLE_64)
1801 return int_value (req_int, frc_str_conv);
1866 make_vector_dims (
const dim_vector& dv,
bool force_vector_conversion,
1867 const std::string& my_type,
const std::string& wanted_type)
1870 retval.chop_trailing_singletons ();
1873 if (retval.ndims () > 2 || (retval(0) != 1 && retval(1) != 1))
1875 if (! force_vector_conversion)
1877 my_type.c_str (), wanted_type.c_str ());
1886 bool frc_vec_conv)
const
1894 bool frc_vec_conv)
const
1902 bool frc_vec_conv)
const
1910 bool frc_vec_conv)
const
1918 bool force_vector_conversion)
const
1922 return retval.
reshape (make_vector_dims (retval.
dims (),
1923 force_vector_conversion,
1927 template <
typename T>
1942 bool force_vector_conversion)
const
1976 double ai = a.
elem (i);
1977 int v =
static_cast<int> (ai);
1979 retval.
xelem (i) = v;
1991 return retval.
reshape (make_vector_dims (retval.
dims (),
1992 force_vector_conversion,
1996 template <
typename T>
2011 bool force_string_conv,
2012 bool force_vector_conversion)
const
2046 double ai = a.
elem (i);
2049 retval.
xelem (i) = v;
2052 error_with_cfn (
"conversion of %g to octave_idx_type value failed", ai);
2061 return retval.
reshape (make_vector_dims (retval.
dims (),
2062 force_vector_conversion,
2068 bool force_vector_conversion)
const
2072 return retval.
reshape (make_vector_dims (retval.
dims (),
2073 force_vector_conversion,
2079 bool frc_vec_conv)
const
2087 bool frc_vec_conv)
const
2096 bool frc_vec_conv)
const
2104 bool frc_vec_conv)
const
2112 bool force_vector_conversion)
const
2116 return retval.
reshape (make_vector_dims (retval.
dims (),
2117 force_vector_conversion,
2123 bool force_vector_conversion)
const
2127 return retval.
reshape (make_vector_dims (retval.
dims (),
2128 force_vector_conversion,
2136 #define XVALUE_EXTRACTOR(TYPE, NAME, FCN) \
2138 octave_value::NAME (const char *fmt, ...) const \
2146 catch (octave::execution_exception& ee) \
2151 va_start (args, fmt); \
2152 verror (ee, fmt, args); \
2218 float_complex_diag_matrix_value)
2254 XVALUE_EXTRACTOR (octave::range<float>, xfloat_range_value, float_range_value)
2255 XVALUE_EXTRACTOR (octave::range<octave_int8>, xint8_range_value, int8_range_value)
2256 XVALUE_EXTRACTOR (octave::range<octave_int16>, xint16_range_value, int16_range_value)
2257 XVALUE_EXTRACTOR (octave::range<octave_int32>, xint32_range_value, int32_range_value)
2258 XVALUE_EXTRACTOR (octave::range<octave_int64>, xint64_range_value, int64_range_value)
2259 XVALUE_EXTRACTOR (octave::range<octave_uint8>, xuint8_range_value, uint8_range_value)
2260 XVALUE_EXTRACTOR (octave::range<octave_uint16>, xuint16_range_value, uint16_range_value)
2261 XVALUE_EXTRACTOR (octave::range<octave_uint32>, xuint32_range_value, uint32_range_value)
2262 XVALUE_EXTRACTOR (octave::range<octave_uint64>, xuint64_range_value, uint64_range_value)
2277 float_complex_column_vector_value)
2281 float_complex_row_vector_value)
2285 octave_idx_type_vector_value)
2301 #undef XVALUE_EXTRACTOR
2312 error (
"range with infinite number of elements cannot be stored");
2337 error (
"range with infinite number of elements cannot be stored");
2353 return m_rep->
write (os, block_size, output_type, skip, flt_fmt);
2359 os << prefix <<
"type_name: " <<
type_name () <<
"\n"
2360 << prefix <<
"count: " <<
get_count () <<
"\n"
2361 << prefix <<
"m_rep info: ";
2406 if (class_id != mxUNKNOWN_CLASS)
2408 bool type_ok =
false;
2412 case mxDOUBLE_CLASS:
2416 case mxSINGLE_CLASS:
2440 case mxUINT16_CLASS:
2444 case mxUINT32_CLASS:
2448 case mxUINT64_CLASS:
2454 error (
"mex_get_data: unexpected type requested");
2458 error (
"mex_get_data: type mismatch");
2460 if (complexity == mxCOMPLEX && !
iscomplex ())
2461 error (
"mex_get_data: objectis not complex as requested");
2467 OCTAVE_NORETURN
static void
2468 err_unary_op_conversion_failed (
const std::string& op,
2469 const std::string& tn)
2471 error (
"operator %s: type conversion for '%s' failed",
2472 op.c_str (), tn.c_str ());
2475 OCTAVE_NORETURN
static void
2476 err_unary_op (
const std::string& on,
const std::string& tn)
2478 error (
"unary operator '%s' not implemented for '%s' operands",
2479 on.c_str (), tn.c_str ());
2493 error (
"in x%s or %sx, x must be defined first",
2494 op_str.c_str (), op_str.c_str ());
2504 = ti.lookup_non_const_unary_op (op, t);
2522 err_unary_op_conversion_failed
2530 f = ti.lookup_non_const_unary_op (op, t);
2536 if (old_rep && --old_rep->
count == 0)
2566 f = ti.lookup_non_const_unary_op (op, t);
2580 const std::list<octave_value_list>& idx)
2592 assign (assop, type, idx, 1.0);
2612 error (
"operator %s: no assign operator found", on.c_str ());
2661 error (
"operator %s: no binary operator found", on.c_str ());
2669 if (type.length () > 0)
2674 if (type.length () > 1 && type[1] ==
'.')
2695 OCTAVE_NORETURN
static void
2696 err_binary_op (
const std::string& on,
const std::string& tn1,
2697 const std::string& tn2)
2699 error (
"binary operator '%s' not implemented for '%s' by '%s' operations",
2700 on.c_str (), tn1.c_str (), tn2.c_str ());
2703 OCTAVE_NORETURN
static void
2704 err_binary_op_conv (
const std::string& on)
2706 error (
"type conversion failed for binary operator '%s'", on.c_str ());
2729 retval =
f (v1,
v2);
2900 error (
"invalid compound operator");
2921 retval =
f (v1,
v2);
2923 retval = decompose_binary_op (ti, op, v1,
v2);
2932 retval = decompose_binary_op (ti, op, v1,
v2);
2947 OCTAVE_NORETURN
static void
2948 err_cat_op (
const std::string& tn1,
const std::string& tn2)
2950 error (
"concatenation operator not implemented for '%s' by '%s' operations",
2951 tn1.c_str (), tn2.c_str ());
2954 OCTAVE_NORETURN
static void
2955 err_cat_op_conv (
void)
2957 error (
"type conversion failed for concatenation operator");
3041 if (op1_type == op2_type)
3069 template <
typename T>
3071 check_colon_operand (
const octave_value& val,
const char *op_str)
3078 static const double out_of_range_top
3082 if (dval >= out_of_range_top
3084 || std::modf (dval, &intpart) != 0.0)
3085 error (
"colon operator %s invalid (not an integer or out of range for given integer type)", op_str);
3091 template <
typename UT,
3092 typename std::enable_if<(std::is_integral<UT>::value
3093 && std::is_unsigned<UT>::value),
3096 integer_difference (UT a, UT b)
3098 return a > b ? a - b : b - a;
3104 template <
typename ST,
3105 typename UT =
typename std::make_unsigned<ST>::type,
3106 typename std::enable_if<(std::is_integral<ST>::value
3107 && std::is_signed<ST>::value),
3110 integer_difference (ST a, ST b)
3115 static const UT offset
3118 UT au =
static_cast<UT
> (a) + offset;
3119 UT bu =
static_cast<UT
> (b) + offset;
3121 return integer_difference (au, bu);
3134 template <
typename T,
3135 typename UT =
typename std::make_unsigned<T>::type,
3136 typename std::enable_if<std::is_integral<T>::value,
3139 range_numel_aux (T base, UT unsigned_increment, T limit)
3144 UT nel_m1 = integer_difference (limit, base) / unsigned_increment;
3148 error (
"too many elements for range!");
3155 template <
typename ST,
3156 typename UT =
typename std::make_unsigned<ST>::type,
3157 typename std::enable_if<(std::is_integral<ST>::value
3158 && std::is_signed<ST>::value),
3161 range_increment (ST increment)
3163 return (increment < 0
3164 ? UT (0) -
static_cast<UT
> (increment)
3165 :
static_cast<UT
> (increment));
3172 template <
typename T,
3173 typename UT =
typename std::make_unsigned<T>::type,
3174 typename std::enable_if<(std::is_integral<UT>::value
3175 && std::is_unsigned<UT>::value),
3178 range_increment (UT increment)
3185 template <
typename T,
3186 typename UT =
typename std::make_unsigned<T>::type>
3187 typename std::enable_if<(std::is_integral<UT>::value
3188 && std::is_unsigned<UT>::value), UT>::type
3189 range_increment (
double increment)
3191 double abs_increment =
std::abs (increment);
3193 return static_cast<UT
> (abs_increment);
3199 template <
typename ST,
3200 typename std::enable_if<(std::is_integral<ST>::value
3201 && std::is_signed<ST>::value),
3204 range_numel (ST base, ST increment, ST limit)
3206 typedef typename std::make_unsigned<ST>::type UT;
3209 || (increment > 0 && base > limit)
3210 || (increment < 0 && base < limit))
3213 UT unsigned_increment = range_increment<ST> (increment);
3215 return range_numel_aux (base, unsigned_increment, limit);
3221 template <
typename UT,
3222 typename std::enable_if<(std::is_integral<UT>::value
3223 && std::is_unsigned<UT>::value),
3226 range_numel (UT base, UT increment, UT limit)
3229 if (increment == 0 || base > limit)
3232 return range_numel_aux (base, increment, limit);
3238 template <
typename T,
3239 typename UT =
typename std::make_unsigned<T>::type,
3240 typename std::enable_if<std::is_integral<T>::value,
3243 range_numel (T base,
double increment, T limit)
3246 if (
math::isnan (increment) || std::modf (increment, &intpart) != 0.0)
3247 error (
"colon operator increment invalid (not an integer)");
3250 || (increment > 0 && base > limit)
3251 || (increment < 0 && base < limit))
3254 static const double out_of_range_top
3257 double abs_increment =
std::abs (increment);
3265 if (abs_increment >= out_of_range_top)
3268 UT unsigned_increment = range_increment<T> (increment);
3270 return range_numel_aux (base, unsigned_increment, limit);
3275 template <
typename T,
3277 typename std::enable_if<(std::is_integral<T>::value
3278 && std::is_arithmetic<IT>::value),
3281 make_int_range (T base,
IT increment, T limit)
3292 typedef typename std::make_unsigned<T>::type UT;
3294 UT unsigned_increment = range_increment<T> (increment);
3297 result.xelem (0) = val;
3303 val += unsigned_increment;
3304 result.xelem (i) = val;
3311 val -= unsigned_increment;
3312 result.xelem (i) = val;
3336 template <
typename T,
3337 typename std::enable_if<std::is_same<T, double>::value,
3340 make_float_range (T base, T increment, T limit,
bool is_for_cmd_expr)
3348 || (increment > 0 && base > limit)
3349 || (increment < 0 && base < limit))
3355 range<T>
r (base, increment, limit);
3357 if (! is_for_cmd_expr && !
r.is_storable ())
3358 error (
"range with infinite number of elements cannot be stored");
3363 template <
typename T,
3364 typename std::enable_if<std::is_same<T, float>::value,
3367 make_float_range (T base, T increment, T limit,
bool is_for_cmd_expr)
3375 || (increment > 0 && base > limit)
3376 || (increment < 0 && base < limit))
3382 range<T>
r (base, increment, limit);
3384 if (! is_for_cmd_expr && !
r.is_storable ())
3385 error (
"range with infinite number of elements cannot be stored");
3390 template <
typename T,
3391 typename std::enable_if<(std::is_same<T, octave_int8>::value
3392 || std::is_same<T, octave_uint8>::value
3393 || std::is_same<T, octave_int16>::value
3394 || std::is_same<T, octave_uint16>::value
3395 || std::is_same<T, octave_int32>::value
3396 || std::is_same<T, octave_uint32>::value
3397 || std::is_same<T, octave_int64>::value
3398 || std::is_same<T, octave_uint64>::value),
3407 check_colon_operand<T> (base,
"lower bound");
3408 check_colon_operand<T> (limit,
"upper bound");
3410 typename T::val_type base_val = octave_value_extract<T> (base).value ();
3411 typename T::val_type limit_val = octave_value_extract<T> (limit).value ();
3417 return make_int_range (base_val, increment_val, limit_val);
3420 check_colon_operand<T> (increment,
"increment");
3422 typename T::val_type increment_val
3423 = octave_value_extract<T> (increment).value ();
3425 return make_int_range (base_val, increment_val, limit_val);
3428 template <
typename T,
3429 typename std::enable_if<std::is_floating_point<T>::value,
3438 T base_val = octave_value_extract<T> (base);
3439 T increment_val = octave_value_extract<T> (increment);
3440 T limit_val = octave_value_extract<T> (limit);
3442 return make_float_range (base_val, increment_val, limit_val,
3456 char type = dq_str ?
'"' :
'\'';
3466 range<double> tmp (mtx_base(0), mtx_increment(0), mtx_limit(0));
3485 tmp1(1) = increment_arg;
3511 if (base.
numel () > 1 || limit.
numel () > 1 || increment.
numel () > 1)
3513 "colon arguments should be scalars");
3517 "imaginary part of complex colon arguments is ignored");
3521 builtin_type_t type_id = get_colon_op_type (base, increment, limit);
3533 return make_float_range<double> (base, increment, limit, is_for_cmd_expr);
3537 return make_float_range<float> (base, increment, limit, is_for_cmd_expr);
3540 return make_int_range<octave_int8> (base, increment, limit);
3543 return make_int_range<octave_int16> (base, increment, limit);
3546 return make_int_range<octave_int32> (base, increment, limit);
3549 return make_int_range<octave_int64> (base, increment, limit);
3552 return make_int_range<octave_uint8> (base, increment, limit);
3555 return make_int_range<octave_uint16> (base, increment, limit);
3558 return make_int_range<octave_uint32> (base, increment, limit);
3561 return make_int_range<octave_uint64> (base, increment, limit);
3564 return make_char_range (base, increment, limit);
3567 error (
"incompatible types found in range expression");
3570 error (
"invalid types found in range expression");
3576 OCTAVE_NORETURN
static void
3577 err_unary_op_conv (
const std::string& on)
3579 error (
"type conversion failed for unary operator '%s'", on.c_str ());
3727 DEFUN (
sizeof, args, ,
3734 if (args.length () != 1)
3737 return ovl (args(0).byte_size ());
3747 decode_subscripts (
const char *name,
const octave_value& arg,
3748 std::string& type_string,
3749 std::list<octave_value_list>& idx)
3752 arg.
xmap_value (
"%s: second argument must be a structure with fields 'type' and 'subs'", name);
3754 if (
m.nfields () != 2 || !
m.contains (
"type") || !
m.contains (
"subs"))
3755 error (
"%s: second argument must be a structure with fields 'type' and 'subs'",
3760 type_string = std::string (nel,
'\0');
3761 idx = std::list<octave_value_list> ();
3766 const Cell type =
m.contents (
"type");
3767 const Cell subs =
m.contents (
"subs");
3769 for (
int k = 0; k < nel; k++)
3771 std::string item = type(k).xstring_value (
"%s: type(%d) must be a string", name, k+1);
3774 type_string[k] =
'{';
3775 else if (item ==
"()")
3776 type_string[k] =
'(';
3777 else if (item ==
".")
3778 type_string[k] =
'.';
3780 error (
"%s: invalid indexing type '%s'", name, item.c_str ());
3784 if (subs(k).is_string ())
3785 idx_item(0) = subs(k);
3786 else if (subs(k).iscell ())
3788 Cell subs_cell = subs(k).cell_value ();
3790 for (
int n = 0;
n < subs_cell.
numel ();
n++)
3792 if (subs_cell(
n).is_string ()
3793 && subs_cell(
n).string_value () ==
":")
3796 idx_item(
n) = subs_cell(
n);
3800 error (
"%s: subs(%d) must be a string or cell array", name, k+1);
3802 idx.push_back (idx_item);
3806 DEFUN (subsref, args, nargout,
3842 if (args.length () != 2)
3846 std::list<octave_value_list> idx;
3848 decode_subscripts (
"subsref", args(1), type, idx);
3855 return arg0.
subsref (type, idx, nargout);
3858 DEFUN (subsasgn, args, ,
3891 if (args.length () != 3)
3895 std::list<octave_value_list> idx;
3897 decode_subscripts (
"subsasgn", args(1), type, idx);
3902 return ovl (args(2).storable_value ());
3990 DEFUN (is_sq_string, args, ,
3997 if (args.length () != 1)
4000 return ovl (args(0).is_sq_string ());
4013 DEFUN (is_dq_string, args, ,
4020 if (args.length () != 1)
4023 return ovl (args(0).is_dq_string ());
4036 DEFUN (optimize_permutation_matrix, args, nargout,
4054 "optimize_permutation_matrix");
4067 DEFUN (optimize_diagonal_matrix, args, nargout,
4085 "optimize_diagonal_matrix");
4112 DEFUN (optimize_range, args, nargout,
template class OCTAVE_CLASS_TEMPLATE_INSTANTIATION_API Array< int >
charNDArray max(char d, const charNDArray &m)
charNDArray min(char d, const charNDArray &m)
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type numel(void) const
Number of elements in the array.
OCTARRAY_OVERRIDABLE_FUNC_API const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
OCTARRAY_API void resize(const dim_vector &dv, const T &rfv)
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API Array< T, Alloc > reshape(octave_idx_type nr, octave_idx_type nc) const
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API T & elem(octave_idx_type n)
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API T & xelem(octave_idx_type n)
Size of the specified dimension.
Vector representing the dimensions (size) of an Array.
OCTAVE_API std::string str(char sep='x') const
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
static dim_vector alloc(int n)
octave_idx_type ndims(void) const
Number of dimensions.
symbol_table & get_symbol_table(void)
octave_value_list feval(const char *name, const octave_value_list &args=octave_value_list(), int nargout=0)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
virtual bool load_hdf5(octave_hdf5_id loc_id, const char *name)
virtual type_conv_info numeric_conversion_function(void) const
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
octave::refcount< octave_idx_type > count
virtual Cell cell_value(void) const
virtual octave_scalar_map scalar_map_value(void) const
virtual octave_user_script * user_script_value(bool silent=false)
virtual bool is_storable(void) const
octave_base_value *(* type_conv_fcn)(const octave_base_value &)
virtual octave_map map_value(void) const
virtual octave_fcn_handle * fcn_handle_value(bool silent=false)
virtual octave_classdef * classdef_object_value(bool silent=false)
virtual octave_value_list list_value(void) const
virtual const void * mex_get_data(void) const
virtual octave_base_value * empty_clone(void) const
virtual int type_id(void) const
virtual std::string class_name(void) const
virtual bool load_ascii(std::istream &is)
virtual bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
virtual octave_user_function * user_function_value(bool silent=false)
virtual octave_base_value * try_narrowing_conversion(void)
virtual void print_info(std::ostream &os, const std::string &prefix) const
virtual 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
virtual std::string type_name(void) const
virtual float_display_format get_edit_display_format(void) const
virtual octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
virtual octave_user_code * user_code_value(bool silent=false)
virtual double double_value(bool=false) const
virtual octave_value undef_subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
virtual void break_closure_cycles(const std::shared_ptr< octave::stack_frame > &)
static void register_type(void)
virtual octave_function * function_value(bool silent=false)
virtual octave_base_value * clone(void) const
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static int static_type_id(void)
static int static_type_id(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
octave_value make_weak_nested_handle(void) const
bool is_weak_anonymous(void) const
static void register_type(void)
bool is_anonymous(void) const
octave_value make_weak_anonymous_handle(void) const
bool is_nested(void) const
bool is_weak_nested(void) const
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static const octave_value instance
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
static void register_type(void)
void maybe_economize(void)
OCTINTERP_API assign_op unary_op_to_assign_op(unary_op op)
OCTINTERP_API octave_user_script * user_script_value(bool silent=false) const
octave_idx_type get_count(void) const
OCTINTERP_API octave_function * function_value(bool silent=false) const
OCTINTERP_API octave_value & non_const_unary_op(unary_op op)
static OCTINTERP_API std::string unary_op_fcn_name(unary_op)
int32NDArray int32_array_value(void) const
uint16NDArray uint16_array_value(void) const
OCTINTERP_API Array< Complex > complex_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
const octave_base_value & get_rep(void) const
static OCTINTERP_API octave_base_value * make_range_rep_deprecated(double base, double inc, double limit)
OCTINTERP_API octave_value_list list_value(void) const
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
OCTINTERP_API binary_op op_eq_to_binary_op(assign_op op)
static OCTINTERP_API std::string binary_op_as_string(binary_op)
OCTINTERP_API ComplexRowVector complex_row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
octave_base_value::type_conv_info numeric_conversion_function(void) const
OCTINTERP_API octave_value & assign(assign_op op, const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
octave_value & operator=(const octave_value &a)
int int_value(bool req_int=false, bool frc_str_conv=false) const
bool is_uint16_type(void) const
builtin_type_t builtin_type(void) const
OCTINTERP_API bool load_ascii(std::istream &is)
int64_t int64_value(bool req_int=false, bool frc_str_conv=false) const
OCTINTERP_API octave_scalar_map scalar_map_value(void) const
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_int8_type(void) const
octave_idx_type rows(void) const
OCTINTERP_API octave_map xmap_value(const char *fmt,...) const
static OCTINTERP_API octave_value empty_conv(const std::string &type, const octave_value &rhs=octave_value())
static OCTINTERP_API std::string assign_op_as_string(assign_op)
octave_idx_type numel(void) const
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_magic_int(void) const
bool is_dq_string(void) const
static OCTINTERP_API assign_op binary_op_to_assign_op(binary_op)
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
octave_base_value * empty_clone(void) const
OCTINTERP_API octave_value storable_value(void) const
bool is_defined(void) const
bool isinteger(void) const
bool is_double_type(void) const
Cell cell_value(void) const
void break_closure_cycles(const std::shared_ptr< octave::stack_frame > &)
bool is_function_handle(void) const
bool is_equal(const octave_value &) const
std::string class_name(void) const
bool is_uint32_type(void) const
octave_idx_type columns(void) const
OCTINTERP_API ColumnVector column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
int8NDArray int8_array_value(void) const
OCTINTERP_API octave_user_function * user_function_value(bool silent=false) const
static OCTINTERP_API std::string unary_op_as_string(unary_op)
OCTINTERP_API octave_user_code * user_code_value(bool silent=false) const
bool is_int64_type(void) const
int64NDArray int64_array_value(void) const
uint8NDArray uint8_array_value(void) const
octave_value reshape(const dim_vector &dv) const
OCTINTERP_API octave_base_value * clone(void) const
bool is_zero_by_zero(void) const
OCTINTERP_API octave_fcn_handle * fcn_handle_value(bool silent=false) const
OCTINTERP_API Array< int > int_vector_value(bool req_int=false, bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API octave_value next_subsref(const std::string &type, const std::list< octave_value_list > &idx, std::size_t skip=1)
bool is_int32_type(void) const
static OCTINTERP_API octave_base_value * nil_rep(void)
bool is_uint64_type(void) const
bool is_int16_type(void) const
uint64NDArray uint64_array_value(void) const
OCTINTERP_API FloatComplexRowVector float_complex_row_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
octave_base_value::type_conv_info numeric_demotion_function(void) const
bool is_range(void) const
NDArray array_value(bool frc_str_conv=false) const
static OCTINTERP_API binary_op assign_op_to_binary_op(assign_op)
static OCTINTERP_API std::string binary_op_fcn_name(binary_op)
bool is_single_type(void) const
uint32NDArray uint32_array_value(void) const
OCTINTERP_API std::string get_dims_str(void) const
octave_value convert_to_str(bool pad=false, bool force=false, char type='\'') const
OCTINTERP_API ComplexColumnVector complex_column_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API Array< float > float_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API octave_map map_value(void) const
octave_value all(int dim=0) const
bool isobject(void) const
octave_base_value * m_rep
The real representation.
OCTINTERP_API Array< FloatComplex > float_complex_vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API const void * mex_get_data(mxClassID class_id=mxUNKNOWN_CLASS, mxComplexity complexity=mxREAL) const
OCTINTERP_API bool load_hdf5(octave_hdf5_id loc_id, const char *name)
bool is_undefined(void) const
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
OCTINTERP_API octave_value single_subsref(const std::string &type, const octave_value_list &idx)
OCTINTERP_API octave_idx_type length(void) const
FloatNDArray float_array_value(bool frc_str_conv=false) const
bool is_uint8_type(void) const
int16NDArray int16_array_value(void) const
OCTINTERP_API Array< double > vector_value(bool frc_str_conv=false, bool frc_vec_conv=false) const
OCTINTERP_API bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
OCTINTERP_API octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
Matrix matrix_value(bool frc_str_conv=false) const
bool iscomplex(void) const
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)
double double_value(bool frc_str_conv=false) const
OCTINTERP_API float_display_format get_edit_display_format(void) const
OCTINTERP_API void make_storable_value(void)
OCTINTERP_API void print_info(std::ostream &os, const std::string &prefix="") const
std::string type_name(void) const
bool is_legacy_object(void) const
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
dim_vector dims(void) 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_classdef * classdef_object_value(bool silent=false) const
static void register_type(void)
octave_value find_function(const std::string &name, const symbol_scope &search_scope=symbol_scope())
octave_value(* unary_op_fcn)(const octave_base_value &)
octave_value(* binary_op_fcn)(const octave_base_value &, const octave_base_value &)
octave_value(* binary_class_op_fcn)(const octave_value &, const octave_value &)
binary_class_op_fcn lookup_binary_class_op(octave_value::binary_op)
octave_value(* cat_op_fcn)(const octave_base_value &, const octave_base_value &, const Array< octave_idx_type > &ra_idx)
octave_value(* unary_class_op_fcn)(const octave_value &)
unary_class_op_fcn lookup_unary_class_op(octave_value::unary_op)
cat_op_fcn lookup_cat_op(int, int)
binary_op_fcn lookup_binary_op(octave_value::binary_op, int, int)
unary_op_fcn lookup_unary_op(octave_value::unary_op, int)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void warning_with_id(const char *id, const char *fmt,...)
void error_with_cfn(const char *fmt,...)
void error(const char *fmt,...)
#define panic_impossible()
void warn_implicit_conversion(const char *id, const char *from, const char *to)
octave::idx_vector idx_vector
interpreter & __get_interpreter__(void)
type_info & __get_type_info__(void)
F77_RET_T const F77_INT F77_CMPLX * A
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
F77_RET_T const F77_DBLE const F77_DBLE * f
class OCTAVE_API RowVector
class OCTAVE_API FloatColumnVector
class OCTAVE_API FloatComplexRowVector
class OCTAVE_API ComplexColumnVector
class OCTAVE_API ColumnVector
class OCTAVE_API FloatComplexColumnVector
class OCTAVE_API ComplexRowVector
class OCTAVE_API FloatRowVector
std::complex< double > Complex
std::complex< float > FloatComplex
static double as_double(OCTAVE_TIME_T sec, long usec)
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()) ? '\'' :'"'))
const octave_char_matrix & v2
octave_double_range octave_range
static bool scalar(const dim_vector &dims)
int register_type(const std::string &t_name, const std::string &c_name, const octave_value &val)
octave::type_info::assign_op_fcn assign_op_fcn
octave::type_info::non_const_unary_op_fcn non_const_unary_op_fcn
static bool Voptimize_range
static bool Voptimize_diagonal_matrix
static bool Voptimize_permutation_matrix
#define XVALUE_EXTRACTOR(TYPE, NAME, FCN)
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)
OCTINTERP_API octave_value unary_op(type_info &ti, octave_value::unary_op op, const octave_value &a)
OCTINTERP_API octave_value colon_op(const octave_value &base, const octave_value &increment, const octave_value &limit, bool is_for_cmd_expr=false)
OCTINTERP_API octave_value binary_op(type_info &ti, octave_value::binary_op op, const octave_value &a, const octave_value &b)
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
octave_value set_internal_variable(bool &var, const octave_value_list &args, int nargout, const char *nm)