23 #if defined (HAVE_CONFIG_H)
43 error (
"transpose not defined for N-D objects");
46 a.is_sq_string () ?
'\'' :
'"');
51 #define DEFCHARNDBINOP_FN(name, op, t1, t2, e1, e2, f) \
53 CONCAT2(oct_binop_, name) (const octave_base_value& a1, \
54 const octave_base_value& a2) \
56 dim_vector a1_dims = a1.dims (); \
57 dim_vector a2_dims = a2.dims (); \
59 bool a1_is_scalar = a1_dims.all_ones (); \
60 bool a2_is_scalar = a2_dims.all_ones (); \
62 const octave_ ## t1& v1 = dynamic_cast<const octave_ ## t1&> (a1); \
63 const octave_ ## t2& v2 = dynamic_cast<const octave_ ## t2&> (a2); \
68 return octave_value ((v1.e1 ## _value ())(0) \
69 op (v2.e2 ## _value ())(0)); \
71 return octave_value (f ((v1.e1 ## _value ())(0), \
72 v2.e2 ## _value ())); \
77 return octave_value (f (v1.e1 ## _value (), \
78 (v2.e2 ## _value ())(0))); \
80 return octave_value (f (v1.e1 ## _value (), \
81 v2.e2 ## _value ())); \
#define DEFNDCHARCATOP_FN(name, t1, t2, f)
charMatrix transpose(void) const
octave_value op_eq(const octave_value &a1, const octave_value &a2)
void assign(const octave_value_list &idx, const MT &rhs)
#define DEFNULLASSIGNOP_FN(name, t, f)
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)
ComplexNDArray concat(NDArray &ra, ComplexNDArray &rb, const Array< octave_idx_type > &ra_idx)
boolMatrix mx_el_le(const boolMatrix &m1, const boolMatrix &m2)
void error(const char *fmt,...)
#define INSTALL_ASSIGNOP(op, t1, t2, f)
void install_str_str_ops(void)
const octave_base_value & a2
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
#define INSTALL_BINOP(op, t1, t2, f)
boolMatrix mx_el_ge(const boolMatrix &m1, const boolMatrix &m2)
#define DEFASSIGNOP(name, t1, t2)
boolMatrix mx_el_gt(const boolMatrix &m1, const boolMatrix &m2)
octave_value op_transpose(const octave_value &a)
boolMatrix mx_el_ne(const boolMatrix &m1, const boolMatrix &m2)
charMatrix char_matrix_value(bool=false) const
octave_value op_le(const octave_value &a1, const octave_value &a2)
octave_value op_lt(const octave_value &a1, const octave_value &a2)
#define INSTALL_CATOP(t1, t2, f)
const octave_char_matrix & v2
octave_value op_ne(const octave_value &a1, const octave_value &a2)
charNDArray char_array_value(bool=false) const
#define INSTALL_UNOP(op, t, f)
boolMatrix mx_el_lt(const boolMatrix &m1, const boolMatrix &m2)
#define DEFCHARNDBINOP_FN(name, op, t1, t2, e1, e2, f)
octave_value op_hermitian(const octave_value &a)
octave_value op_ge(const octave_value &a1, const octave_value &a2)
boolMatrix mx_el_eq(const boolMatrix &m1, const boolMatrix &m2)
octave_value op_gt(const octave_value &a1, const octave_value &a2)
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))