98 template <
typename T, T op (
typename ref_param<T>::type,
99 typename ref_param<T>::type)>
113 template <
typename T>
132 template <
typename T>
151 template <
typename T>
178 sdv(dim) = ddv(dim) = 0;
180 (*current_liboctave_error_handler) (
"accumdim: dimension mismatch");
183 const T *src = vals.
data ();
214 template <
typename T>
226 template <
typename T>
237 template <
typename T>
248 template <
typename T>
259 template <
typename T>
272 template <
typename T>
283 template <
typename T>
294 template <
typename T>
305 template <
typename T>
318 #define MARRAY_NDS_OP(OP, FN) \
319 template <typename T> \
321 operator OP (const MArray<T>& a, const T& s) \
323 return do_ms_binary_op<T, T, T> (a, s, FN); \
333 #define MARRAY_SND_OP(OP, FN) \
334 template <typename T> \
336 operator OP (const T& s, const MArray<T>& a) \
338 return do_sm_binary_op<T, T, T> (s, a, FN); \
348 #define MARRAY_NDND_OP(FCN, OP, FN) \
349 template <typename T> \
351 FCN (const MArray<T>& a, const MArray<T>& b) \
353 return do_mm_binary_op<T, T, T> (a, b, FN, FN, FN, #FCN); \
361 template <typename T>
368 template <
typename T>
375 template <
typename T>
383 #define INSTANTIATE_MARRAY(T, API) \
384 template <> API void \
385 MArray<T>::instantiation_guard () { } \
387 template class API MArray<T>
MArray< T > & quotient_eq(MArray< T > &a, const MArray< T > &b)
#define MARRAY_NDS_OP(OP, FN)
MArray< T > operator-(const MArray< T > &a, const T &s)
MArray< T > & product_eq(MArray< T > &a, const MArray< T > &b)
MArray< T > quotient(const MArray< T > &a, const MArray< T > &b)
MArray< T > & operator*=(MArray< T > &a, const T &s)
MArray< T > & operator+=(MArray< T > &a, const T &s)
#define MARRAY_SND_OP(OP, FN)
MArray< T > & operator/=(MArray< T > &a, const T &s)
MArray< T > & operator-=(MArray< T > &a, const T &s)
MArray< T > product(const MArray< T > &a, const MArray< T > &b)
#define MARRAY_NDND_OP(FCN, OP, FN)
charNDArray max(char d, const charNDArray &m)
charNDArray min(char d, const charNDArray &m)
N Dimensional Array with copy-on-write semantics.
OCTARRAY_OVERRIDABLE_FUNC_API const T * data(void) const
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type numel(void) const
Number of elements in the array.
OCTARRAY_OVERRIDABLE_FUNC_API const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
OCTARRAY_API void resize(const dim_vector &dv, const T &rfv)
Size of the specified dimension.
OCTARRAY_API T * fortran_vec(void)
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API bool is_shared(void) const
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API int ndims(void) const
Size of the specified dimension.
Template for N-dimensional array classes with like-type math operators.
OCTARRAY_API void idx_min(const octave::idx_vector &idx, const MArray< T > &vals)
OCTARRAY_API void idx_add_nd(const octave::idx_vector &idx, const MArray< T > &vals, int dim=-1)
OCTARRAY_API void changesign(void)
OCTARRAY_API void idx_add(const octave::idx_vector &idx, T val)
Performs indexed accumulative addition.
OCTARRAY_API void idx_max(const octave::idx_vector &idx, const MArray< T > &vals)
static OCTARRAY_API void instantiation_guard()
void operator()(octave_idx_type i)
_idxadda_helper(T *a, const T *v)
void operator()(octave_idx_type i)
_idxadds_helper(T *a, T v)
Vector representing the dimensions (size) of an Array.
int first_non_singleton(int def=0) const
OCTAVE_API dim_vector redim(int n) const
Force certain dimensionality, preserving numel ().
octave::idx_vector idx_vector
void mx_inline_div2(std::size_t n, R *r, const X *x)
void mx_inline_sub2(std::size_t n, R *r, const X *x)
void mx_inline_add2(std::size_t n, R *r, const X *x)
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_uminus2(std::size_t n, R *r)
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_mul2(std::size_t n, R *r, const X *x)
void mx_inline_mul(std::size_t n, R *r, const X *x, const Y *y)
void get_extent_triplet(const dim_vector &dims, int &dim, octave_idx_type &l, octave_idx_type &n, octave_idx_type &u)
T::size_type numel(const T &str)
_idxbinop_helper(T *a, const T *v)
void operator()(octave_idx_type i)