38 bool retval = this->rows () == this->cols ();
57 #define MARRAY_DAS_OP(OP, FN) \
58 template <typename T> \
60 operator OP (const MDiagArray2<T>& a, const T& s) \
62 return MDiagArray2<T> (do_ms_binary_op<T, T, T> (a, s, FN), a.d1, a.d2); \
80 #define MARRAY_DADA_OP(FCN, OP, FN) \
81 template <typename T> \
83 FCN (const MDiagArray2<T>& a, const MDiagArray2<T>& b) \
85 if (a.d1 != b.d1 || a.d2 != b.d2) \
86 octave::err_nonconformant (#FCN, a.d1, a.d2, b.d1, b.d2); \
88 return MDiagArray2<T> (do_mm_binary_op<T, T, T> (a, b, FN, FN, FN, #FCN), a.d1, a.d2); \
104 template <
typename T>
#define MARRAY_DADA_OP(FCN, OP, FN)
#define MARRAY_DAS_OP(OP, FN)
MDiagArray2< T > operator-(const MDiagArray2< T > &a, const MDiagArray2< T > &b)
MDiagArray2< T > product(const MDiagArray2< T > &a, const MDiagArray2< T > &b)
Template for two dimensional diagonal array with math operators.
bool is_multiple_of_identity(T val) const
void mx_inline_div(size_t n, R *r, const X *x, const Y *y)
void mx_inline_uminus(size_t n, R *r, const X *x)
void mx_inline_mul(size_t n, R *r, const X *x, const Y *y)
void mx_inline_add(size_t n, R *r, const X *x, const Y *y)
void mx_inline_sub(size_t n, R *r, const X *x, const Y *y)
octave_value::octave_value(const Array< char > &chm, char type) return retval