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), \
81 #define MARRAY_DADA_OP(FCN, OP, FN) \
82 template <typename T> \
84 FCN (const MDiagArray2<T>& a, const MDiagArray2<T>& b) \
86 if (a.m_d1 != b.m_d1 || a.m_d2 != b.m_d2) \
87 octave::err_nonconformant (#FCN, a.m_d1, a.m_d2, b.m_d1, b.m_d2); \
89 return MDiagArray2<T> (do_mm_binary_op<T, T, T> (a, b, FN, FN, FN, #FCN), \
106 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_sub(std::size_t n, R *r, const X *x, const Y *y)
void mx_inline_uminus(std::size_t n, R *r, const X *x)
void mx_inline_div(std::size_t n, R *r, const X *x, const Y *y)
void mx_inline_add(std::size_t n, R *r, const X *x, const Y *y)
void mx_inline_mul(std::size_t n, R *r, const X *x, const Y *y)