23 #if defined (HAVE_CONFIG_H) 42 #define DEF_CLASS_UNOP(name) \ 44 oct_unop_ ## name (const octave_value& a) \ 46 octave_value retval; \ 48 std::string class_name = a.class_name (); \ 50 octave::symbol_table& symtab \ 51 = octave::__get_symbol_table__ ("oct_unop_" #name); \ 53 octave_value meth = symtab.find_method (#name, class_name); \ 55 if (meth.is_undefined ()) \ 56 error ("%s method not defined for %s class", #name, \ 57 class_name.c_str ()); \ 59 octave_value_list args; \ 63 octave_value_list tmp = octave::feval (meth.function_value (), args, 1); \ 65 if (tmp.length () > 0) \ 79 #define DEF_CLASS_BINOP(name) \ 81 oct_binop_ ## name (const octave_value& a1, const octave_value& a2) \ 83 octave_value retval; \ 85 std::string dispatch_type \ 86 = (a1.isobject () ? a1.class_name () : a2.class_name ()); \ 88 octave::symbol_table& symtab \ 89 = octave::__get_symbol_table__ ("oct_unop_" #name); \ 91 octave_value meth = symtab.find_method (#name, dispatch_type); \ 93 if (meth.is_undefined ()) \ 94 error ("%s method not defined for %s class", #name, \ 95 dispatch_type.c_str ()); \ 97 octave_value_list args; \ 102 octave_value_list tmp = octave::feval (meth.function_value (), args, 1); \ 104 if (tmp.length () > 0) \ 129 #define INSTALL_CLASS_UNOP_TI(ti, op, f) \ 130 ti.install_unary_class_op (octave_value::op, oct_unop_ ## f) 132 #define INSTALL_CLASS_BINOP_TI(ti, op, f) \ 133 ti.install_binary_class_op (octave_value::op, oct_binop_ ## f) #define DEF_CLASS_BINOP(name)
octave_value op_uplus(const octave_value &a)
octave_value op_el_pow(const octave_value &a1, const octave_value &a2)
void install_class_ops(octave::type_info &ti)
octave_value op_eq(const octave_value &a1, const octave_value &a2)
#define DEF_CLASS_UNOP(name)
octave_value op_el_ldiv(const octave_value &a1, const octave_value &a2)
static void transpose(octave_idx_type N, const octave_idx_type *ridx, const octave_idx_type *cidx, octave_idx_type *ridx2, octave_idx_type *cidx2)
octave_value op_pow(const octave_value &a1, const octave_value &a2)
OCTAVE_EXPORT octave_value_list or class The return code an ordinary file in Octave s or(after appending @samp{.m}) a function file in Octave 's ode
octave_value op_div(const octave_value &a1, const octave_value &a2)
octave_value op_el_or(const octave_value &a1, const octave_value &a2)
octave_value op_not(const octave_value &a)
octave_value op_transpose(const octave_value &a)
octave_value op_el_and(const octave_value &a1, const octave_value &a2)
#define INSTALL_CLASS_UNOP_TI(ti, op, f)
octave_value op_le(const octave_value &a1, const octave_value &a2)
octave_value op_lt(const octave_value &a1, const octave_value &a2)
octave_value op_el_div(const octave_value &a1, const octave_value &a2)
octave_value op_ne(const octave_value &a1, const octave_value &a2)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several times
octave_value op_add(const octave_value &a1, const octave_value &a2)
octave_value op_ldiv(const octave_value &a1, const octave_value &a2)
octave_value op_sub(const octave_value &a1, const octave_value &a2)
octave_value op_el_mul(const octave_value &a1, const octave_value &a2)
octave_value op_hermitian(const octave_value &a)
octave_value op_ge(const octave_value &a1, const octave_value &a2)
octave_value op_uminus(const octave_value &a)
octave_value op_mul(const octave_value &a1, const octave_value &a2)
octave_value op_gt(const octave_value &a1, const octave_value &a2)
#define INSTALL_CLASS_BINOP_TI(ti, op, f)