52 { array[i] += *vals++; }
99 { array[i] = op (array[i], *vals++); }
169 sdv(dim) = ddv(dim) = 0;
171 (*current_liboctave_error_handler)
172 (
"accumdim: dimension mismatch");
175 const T *src = vals.
data ();
311 #define MARRAY_NDS_OP(OP, FN) \
314 operator OP (const MArray<T>& a, const T& s) \
316 return do_ms_binary_op<T, T, T> (a, s, FN); \
326 #define MARRAY_SND_OP(OP, FN) \
329 operator OP (const T& s, const MArray<T>& a) \
331 return do_sm_binary_op<T, T, T> (s, a, FN); \
341 #define MARRAY_NDND_OP(FCN, OP, FN) \
344 FCN (const MArray<T>& a, const MArray<T>& b) \
346 return do_mm_binary_op<T, T, T> (a, b, FN, FN, FN, #FCN); \
void mx_inline_mul2(size_t n, R *r, const X *x)
void mx_inline_add2(size_t n, R *r, const X *x)
_idxadds_helper(T *a, T v)
void operator()(octave_idx_type i)
octave_idx_type length(octave_idx_type n=0) const
void mx_inline_sub2(size_t n, R *r, const X *x)
_idxadda_helper(T *a, const T *v)
void mx_inline_uminus2(size_t n, R *r)
MArray< T > & operator-=(MArray< T > &a, const T &s)
MArray< T > operator-(const MArray< T > &a, const T &s)
MArray< T > & operator*=(MArray< T > &a, const T &s)
_idxbinop_helper(T *a, const T *v)
void idx_max(const idx_vector &idx, const MArray< T > &vals)
int first_non_singleton(int def=0) const
void mx_inline_mul(size_t n, R *r, const X *x, const Y *y)
MArray< T > & product_eq(MArray< T > &a, const MArray< T > &b)
void idx_add_nd(const idx_vector &idx, const MArray< T > &vals, int dim=-1)
void loop(octave_idx_type n, Functor body) const
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
MArray< T > product(const MArray< T > &a, const MArray< T > &b)
void mx_inline_sub(size_t n, R *r, const X *x, const Y *y)
void mx_inline_uminus(size_t n, R *r, const X *x)
MArray< T > & operator+=(MArray< T > &a, const T &s)
MArray< T > & operator/=(MArray< T > &a, const T &s)
void idx_add(const idx_vector &idx, T val)
void operator()(octave_idx_type i)
const T * data(void) const
void resize(const dim_vector &dv, const T &rfv)
dim_vector redim(int n) const
if_then_else< is_class_type< T >::no, T, T const & >::result type
MArray< T > & quotient_eq(MArray< T > &a, const MArray< T > &b)
#define MARRAY_NDND_OP(FCN, OP, FN)
void idx_min(const idx_vector &idx, const MArray< T > &vals)
Handles the reference counting for all the derived classes.
charNDArray max(char d, const charNDArray &m)
octave_idx_type length(void) const
Number of elements in the array.
octave_idx_type extent(octave_idx_type n) const
MArray< T > quotient(const MArray< T > &a, const MArray< T > &b)
void get_extent_triplet(const dim_vector &dims, int &dim, octave_idx_type &l, octave_idx_type &n, octave_idx_type &u)
void mx_inline_add(size_t n, R *r, const X *x, const Y *y)
#define MARRAY_SND_OP(OP, FN)
void mx_inline_div(size_t n, R *r, const X *x, const Y *y)
const T * fortran_vec(void) const
void mx_inline_div2(size_t n, R *r, const X *x)
#define MARRAY_NDS_OP(OP, FN)
charNDArray min(char d, const charNDArray &m)