118 template <
typename T>
139 template <
typename T>
166 sdv(dim) = ddv(dim) = 0;
168 (*current_liboctave_error_handler) (
"accumdim: dimension mismatch");
171 const T *src = vals.
data ();
202 template <
typename T>
214 template <
typename T>
225 template <
typename T>
236 template <
typename T>
247 template <
typename T>
260 template <
typename T>
271 template <
typename T>
282 template <
typename T>
293 template <
typename T>
306 #define MARRAY_NDS_OP(OP, FN) \ 307 template <typename T> \ 309 operator OP (const MArray<T>& a, const T& s) \ 311 return do_ms_binary_op<T, T, T> (a, s, FN); \ 321 #define MARRAY_SND_OP(OP, FN) \ 322 template <typename T> \ 324 operator OP (const T& s, const MArray<T>& a) \ 326 return do_sm_binary_op<T, T, T> (s, a, FN); \ 336 #define MARRAY_NDND_OP(FCN, OP, FN) \ 337 template <typename T> \ 339 FCN (const MArray<T>& a, const MArray<T>& b) \ 341 return do_mm_binary_op<T, T, T> (a, b, FN, FN, FN, #FCN); \ 349 template <typename T>
356 template <
typename T>
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)
void idx_min(const idx_vector &idx, const MArray< T > &vals)
Template for N-dimensional array classes with like-type math operators.
void mx_inline_sub2(size_t n, R *r, const X *x)
_idxadda_helper(T *a, const T *v)
void loop(octave_idx_type n, Functor body) const
const T * data(void) const
void idx_add_nd(const idx_vector &idx, const MArray< T > &vals, int dim=-1)
octave_idx_type extent(octave_idx_type n) const
void mx_inline_uminus2(size_t n, R *r)
identity matrix If supplied two scalar respectively For allows like xample val
const T * fortran_vec(void) const
void idx_max(const idx_vector &idx, const MArray< T > &vals)
MArray< T > & operator-=(MArray< T > &a, const T &s)
MArray< T > operator-(const MArray< T > &a, const T &s)
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
MArray< T > & operator*=(MArray< T > &a, const T &s)
_idxbinop_helper(T *a, const T *v)
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)
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
then the function must return scalars which will be concatenated into the return array(s). If code
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 operator()(octave_idx_type i)
int first_non_singleton(int def=0) const
void resize(const dim_vector &dv, const T &rfv)
Resizing (with fill).
octave_idx_type length(octave_idx_type n=0) const
dim_vector redim(int n) const
Force certain dimensionality, preserving numel ().
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)
N Dimensional Array with copy-on-write semantics.
charNDArray max(char d, const charNDArray &m)
T::size_type numel(const T &str)
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)
void mx_inline_div2(size_t n, R *r, const X *x)
octave_idx_type numel(void) const
Number of elements in the array.
Vector representing the dimensions (size) of an Array.
#define MARRAY_NDS_OP(OP, FN)
void idx_add(const idx_vector &idx, T val)
Performs indexed accumulative addition.
charNDArray min(char d, const charNDArray &m)