23 #if defined (HAVE_CONFIG_H) 45 for (
int i = 0;
i <
x.numel ();
i++)
65 : num_types (0), types (
dim_vector (init_tab_sz, 1),
""),
73 compound_binary_ops (
dim_vector (
octave_value::num_compound_binary_ops, init_tab_sz, init_tab_sz), nullptr),
74 cat_ops (
dim_vector (init_tab_sz, init_tab_sz), nullptr),
77 pref_assign_conv (
dim_vector (init_tab_sz, init_tab_sz), -1),
78 widening_ops (
dim_vector (init_tab_sz, init_tab_sz), nullptr)
88 bool abort_on_duplicate)
96 if (abort_on_duplicate)
98 std::cerr <<
"duplicate type " << t_name << std::endl;
102 warning (
"duplicate type %s\n", t_name.c_str ());
161 bool abort_on_duplicate)
167 if (abort_on_duplicate)
169 std::cerr <<
"duplicate unary operator '" << op_name
170 <<
"' for class dispatch" << std::endl;
174 warning (
"duplicate unary operator '%s' for class dispatch",
179 =
reinterpret_cast<void *
> (
f);
192 if (abort_on_duplicate)
194 std::cerr <<
"duplicate unary operator '" << op_name
195 <<
"' for type '" << type_name <<
"'" << std::endl;
199 warning (
"duplicate unary operator '%s' for type '%s'",
200 op_name.c_str (), type_name.c_str ());
211 bool abort_on_duplicate)
218 if (abort_on_duplicate)
220 std::cerr <<
"duplicate unary operator '" << op_name
221 <<
"' for type '" << type_name <<
"'" << std::endl;
225 warning (
"duplicate unary operator '%s' for type '%s'",
226 op_name.c_str (), type_name.c_str ());
230 =
reinterpret_cast<void *
> (
f);
238 bool abort_on_duplicate)
244 if (abort_on_duplicate)
247 std::cerr <<
"duplicate binary operator '" << op_name
248 <<
"' for class dispatch" << std::endl;
252 warning (
"duplicate binary operator '%s' for class dispatch",
257 =
reinterpret_cast<void *
> (
f);
265 bool abort_on_duplicate)
273 if (abort_on_duplicate)
275 std::cerr <<
"duplicate binary operator '" << op_name
276 <<
"' for types '" << t1_name <<
"' and '" 277 << t2_name <<
"'" << std::endl;
281 warning (
"duplicate binary operator '%s' for types '%s' and '%s'",
282 op_name.c_str (), t1_name.c_str (), t1_name.c_str ());
286 =
reinterpret_cast<void *
> (
f);
294 bool abort_on_duplicate)
300 if (abort_on_duplicate)
302 std::cerr <<
"duplicate compound binary operator '" 303 << op_name <<
"' for class dispatch" << std::endl;
307 warning (
"duplicate compound binary operator '%s' for class dispatch",
312 =
reinterpret_cast<void *
> (
f);
320 bool abort_on_duplicate)
328 if (abort_on_duplicate)
330 std::cerr <<
"duplicate compound binary operator '" 331 << op_name <<
"' for types '" << t1_name
332 <<
"' and '" << t2_name <<
"'" << std::endl;
336 warning (
"duplicate compound binary operator '%s' for types '%s' and '%s'",
337 op_name.c_str (), t1_name.c_str (), t1_name.c_str ());
341 =
reinterpret_cast<void *
> (
f);
347 bool abort_on_duplicate)
354 if (abort_on_duplicate)
356 std::cerr <<
"duplicate concatenation operator for types '" 357 << t1_name <<
"' and '" << t2_name <<
"'" << std::endl;
361 warning (
"duplicate concatenation operator for types '%s' and '%s'",
362 t1_name.c_str (), t1_name.c_str ());
371 int t_lhs,
int t_rhs,
373 bool abort_on_duplicate)
381 if (abort_on_duplicate)
383 std::cerr <<
"duplicate assignment operator '" 384 << op_name <<
"' for types '" << t_lhs_name
385 <<
"' and '" << t_rhs_name <<
"'" << std::endl;
389 warning (
"duplicate assignment operator '%s' for types '%s' and '%s'",
390 op_name.c_str (), t_lhs_name.c_str (), t_rhs_name.c_str ());
394 =
reinterpret_cast<void *
> (
f);
401 bool abort_on_duplicate)
408 if (abort_on_duplicate)
410 std::cerr <<
"duplicate assignment operator '" << op_name
411 <<
"' for types '" << t_lhs_name <<
"'" << std::endl;
415 warning (
"duplicate assignment operator '%s' for types '%s'",
416 op_name.c_str (), t_lhs_name.c_str ());
420 =
reinterpret_cast<void *
> (
f);
427 bool abort_on_duplicate)
434 if (abort_on_duplicate)
436 std::cerr <<
"overriding assignment conversion for types '" 437 << t_lhs_name <<
"' and '" << t_rhs_name <<
"'" 442 warning (
"overriding assignment conversion for types '%s' and '%s'",
443 t_lhs_name.c_str (), t_rhs_name.c_str ());
453 bool abort_on_duplicate)
460 if (abort_on_duplicate)
462 std::cerr <<
"overriding widening op for '" << t_name
463 <<
"' to '" << t_result_name <<
"'" << std::endl;
467 warning (
"overriding widening op for '%s' to '%s'",
468 t_name.c_str (), t_result_name.c_str ());
552 int t_lhs,
int t_rhs)
603 for (
int i = 0;
i < len;
i++)
628 for (
int i = 0;
i < len;
i++)
652 for (
int j = 0; j < len; j++)
653 for (
int i = 0;
i < len;
i++)
678 for (
int j = 0; j < len; j++)
679 for (
int i = 0;
i < len;
i++)
704 for (
int j = 0; j < len; j++)
705 for (
int i = 0;
i < len;
i++)
729 for (
int i = 0;
i < len;
i++)
1018 int nargin = args.length ();
1030 return ovl (args(0).type_name ());
1129 DEFMETHOD (__dump_typeinfo__, interp, args, ,
1135 if (args.length () > 0)
octave::type_info::assignany_op_fcn assignany_op_fcn
bool register_cat_op(int t1, int t2, cat_op_fcn f)
octave::type_info::unary_op_fcn unary_op_fcn
bool register_assign_op(octave_value::assign_op, int, int, assign_op_fcn, bool abort_on_duplicate=false)
static NDArray as_nd_array(const Array< int > &x)
octave_scalar_map assignany_ops_map(void) const
bool register_unary_op(octave_value::unary_op op, int t, unary_op_fcn f)
Array< void * > non_const_unary_ops
octave_scalar_map non_const_unary_ops_map(void) const
octave_value lookup_type(const std::string &nm)
Array< std::string > types
octave_value(* binary_class_op_fcn)(const octave_value &, const octave_value &)
#define DEFMETHOD(name, interp_name, args_name, nargout_name, doc)
Macro to define a builtin method.
Array< void * > compound_binary_class_ops
unary_op_fcn lookup_unary_op(octave_value::unary_op, int)
octave_value(* cat_op_fcn)(octave_base_value &, const octave_base_value &, const Array< octave_idx_type > &ra_idx)
OCTINTERP_API void print_usage(void)
static std::string binary_op_as_string(binary_op)
octave_value(* binary_op_fcn)(const octave_base_value &, const octave_base_value &)
Array< octave_value * > vals
identity matrix If supplied two scalar respectively For allows like xample val
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE * f
octave_base_value::type_conv_fcn lookup_widening_op(int t, int t_result)
octave_value(* assignany_op_fcn)(octave_base_value &, const octave_value_list &, const octave_value &)
void install_types(octave::type_info &ti)
bool register_pref_assign_conv(int, int, int, bool abort_on_duplicate=false)
octave_base_value::type_conv_fcn lookup_widening_op(int, int)
binary_op_fcn lookup_binary_op(octave_value::binary_op, int, int)
void(* non_const_unary_op_fcn)(octave_base_value &)
octave_value lookup_type(const std::string &nm)
bool register_binary_op(octave_value::binary_op, int, int, binary_op_fcn, bool abort_on_duplicate=false)
string_vector installed_type_names(void) const
assignany_op_fcn lookup_assignany_op(octave_value::assign_op op, int t_lhs)
Array< void * > binary_class_ops
static std::string assign_op_as_string(assign_op)
octave_idx_type columns(void) const
octave::type_info::unary_class_op_fcn unary_class_op_fcn
int lookup_pref_assign_conv(int t_lhs, int t_rhs)
binary_op_fcn lookup_binary_op(octave_value::binary_op op, int t1, int t2)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
binary_class_op_fcn lookup_binary_class_op(octave_value::binary_op)
unary_class_op_fcn lookup_unary_class_op(octave_value::unary_op op)
assign_op_fcn lookup_assign_op(octave_value::assign_op op, int t_lhs, int t_rhs)
octave::type_info::non_const_unary_op_fcn non_const_unary_op_fcn
bool register_pref_assign_conv(int t_lhs, int t_rhs, int t_result)
octave_value(* unary_op_fcn)(const octave_base_value &)
octave_scalar_map binary_ops_map(void) const
octave_value(* assign_op_fcn)(octave_base_value &, const octave_value_list &, const octave_base_value &)
Array< void * > assignany_ops
octave_scalar_map assign_ops_map(void) const
type_info(int init_tab_sz=16)
octave_scalar_map installed_type_info(void) const
assign_op_fcn lookup_assign_op(octave_value::assign_op, int, int)
OCTAVE_EXPORT octave_value_list isdir nd deftypefn *std::string nm
Array< void * > widening_ops
octave_scalar_map installed_type_info(void)
type_info & __get_type_info__(const std::string &who)
cat_op_fcn lookup_cat_op(int, int)
Array< void * > assign_ops
bool register_unary_op(octave_value::unary_op, int, unary_op_fcn, bool abort_on_duplicate=false)
int lookup_pref_assign_conv(int, int)
bool register_non_const_unary_op(octave_value::unary_op op, int t, non_const_unary_op_fcn f)
unary_op_fcn lookup_unary_op(octave_value::unary_op op, int t)
bool register_cat_op(int, int, cat_op_fcn, bool abort_on_duplicate=false)
static std::string binary_op_fcn_name(binary_op)
bool register_assign_op(octave_value::assign_op op, int t_lhs, int t_rhs, assign_op_fcn f)
void resize(const dim_vector &dv, const T &rfv)
Resizing (with fill).
Array< void * > compound_binary_ops
Array< void * > unary_ops
bool register_assignany_op(octave_value::assign_op, int, assignany_op_fcn, bool abort_on_duplicate=false)
string_vector installed_type_names(void)
bool register_non_const_unary_op(octave_value::unary_op, int, non_const_unary_op_fcn, bool abort_on_duplicate=false)
bool register_unary_class_op(octave_value::unary_op, unary_class_op_fcn, bool abort_on_duplicate=false)
bool register_unary_class_op(octave_value::unary_op op, unary_class_op_fcn f)
bool register_binary_class_op(octave_value::binary_op, binary_class_op_fcn, bool abort_on_duplicate=false)
octave_scalar_map compound_binary_ops_map(void) const
Array< void * > binary_ops
bool register_binary_class_op(octave_value::binary_op op, binary_class_op_fcn f)
T & xelem(octave_idx_type n)
void install_ops(octave::type_info &)
void warning(const char *fmt,...)
octave_scalar_map unary_ops_map(void) const
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
int register_type(const std::string &, const std::string &, const octave_value &, bool abort_on_duplicate=false)
non_const_unary_op_fcn lookup_non_const_unary_op(octave_value::unary_op op, int t)
bool register_assignany_op(octave_value::assign_op op, int t_lhs, assignany_op_fcn f)
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).isinteger())
T & checkelem(octave_idx_type n)
static boolNDArray as_bool_nd_array(const Array< void *> &x)
unary_class_op_fcn lookup_unary_class_op(octave_value::unary_op)
bool register_widening_op(int t, int t_result, octave_base_value::type_conv_fcn f)
int register_type(const std::string &t_name, const std::string &c_name, const octave_value &val)
octave::type_info::binary_op_fcn binary_op_fcn
octave::type_info::binary_class_op_fcn binary_class_op_fcn
Array< void * > unary_class_ops
octave::type_info::assign_op_fcn assign_op_fcn
octave::type_info::cat_op_fcn cat_op_fcn
octave_value(* unary_class_op_fcn)(const octave_value &)
binary_class_op_fcn lookup_binary_class_op(octave_value::binary_op op)
bool register_widening_op(int, int, octave_base_value::type_conv_fcn, bool abort_on_duplicate=false)
assignany_op_fcn lookup_assignany_op(octave_value::assign_op, int)
non_const_unary_op_fcn lookup_non_const_unary_op(octave_value::unary_op, int)
static std::string unary_op_as_string(unary_op)
octave_idx_type numel(void) const
Number of elements in the array.
Vector representing the dimensions (size) of an Array.
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
bool register_binary_op(octave_value::binary_op op, int t1, int t2, binary_op_fcn f)
octave_base_value *(* type_conv_fcn)(const octave_base_value &)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE * x
cat_op_fcn lookup_cat_op(int t1, int t2)
charNDArray min(char d, const charNDArray &m)
Array< int > pref_assign_conv