25 #if !defined (octave_mx_inlines_h)
26 #define octave_mx_inlines_h 1
45 template <
class R,
class S>
47 {
for (
size_t i = 0; i < n; i++)
r[i] = s; }
49 #define DEFMXUNOP(F, OP) \
50 template <class R, class X> \
51 inline void F (size_t n, R *r, const X *x) throw () \
52 { for (size_t i = 0; i < n; i++) r[i] = OP x[i]; }
56 #define DEFMXUNOPEQ(F, OP) \
58 inline void F (size_t n, R *r) throw () \
59 { for (size_t i = 0; i < n; i++) r[i] = OP r[i]; }
63 #define DEFMXUNBOOLOP(F, OP) \
65 inline void F (size_t n, bool *r, const X *x) throw () \
66 { const X zero = X (); for (size_t i = 0; i < n; i++) r[i] = x[i] OP zero; }
71 #define DEFMXBINOP(F, OP) \
72 template <class R, class X, class Y> \
73 inline void F (size_t n, R *r, const X *x, const Y *y) throw () \
74 { for (size_t i = 0; i < n; i++) r[i] = x[i] OP y[i]; } \
75 template <class R, class X, class Y> \
76 inline void F (size_t n, R *r, const X *x, Y y) throw () \
77 { for (size_t i = 0; i < n; i++) r[i] = x[i] OP y; } \
78 template <class R, class X, class Y> \
79 inline void F (size_t n, R *r, X x, const Y *y) throw () \
80 { for (size_t i = 0; i < n; i++) r[i] = x OP y[i]; }
87 #define DEFMXBINOPEQ(F, OP) \
88 template <class R, class X> \
89 inline void F (size_t n, R *r, const X *x) throw () \
90 { for (size_t i = 0; i < n; i++) r[i] OP x[i]; } \
91 template <class R, class X> \
92 inline void F (size_t n, R *r, X x) throw () \
93 { for (size_t i = 0; i < n; i++) r[i] OP x; }
100 #define DEFMXCMPOP(F, OP) \
101 template <class X, class Y> \
102 inline void F (size_t n, bool *r, const X *x, const Y *y) throw () \
103 { for (size_t i = 0; i < n; i++) r[i] = x[i] OP y[i]; } \
104 template <class X, class Y> \
105 inline void F (size_t n, bool *r, const X *x, Y y) throw () \
106 { for (size_t i = 0; i < n; i++) r[i] = x[i] OP y; } \
107 template <class X, class Y> \
108 inline void F (size_t n, bool *r, X x, const Y *y) throw () \
109 { for (size_t i = 0; i < n; i++) r[i] = x OP y[i]; }
121 {
return x.real () != 0 || x.imag () != 0; }
123 {
return x.
value (); }
128 for (
size_t i = 0; i < n; i++)
134 for (
size_t i = 0; i < n; i++)
r[i] = !
r[i];
137 #define DEFMXBOOLOP(F, NOT1, OP, NOT2) \
138 template <class X, class Y> \
139 inline void F (size_t n, bool *r, const X *x, const Y *y) throw () \
141 for (size_t i = 0; i < n; i++) \
142 r[i] = (NOT1 logical_value (x[i])) OP (NOT2 logical_value (y[i])); \
144 template <class X, class Y> \
145 inline void F (size_t n, bool *r, const X *x, Y y) throw () \
147 const bool yy = (NOT2 logical_value (y)); \
148 for (size_t i = 0; i < n; i++) \
149 r[i] = (NOT1 logical_value (x[i])) OP yy; \
151 template <class X, class Y> \
152 inline void F (size_t n, bool *r, X x, const Y *y) throw () \
154 const bool xx = (NOT1 logical_value (x)); \
155 for (size_t i = 0; i < n; i++) \
156 r[i] = xx OP (NOT2 logical_value (y[i])); \
166 #define DEFMXBOOLOPEQ(F, OP) \
168 inline void F (size_t n, bool *r, const X *x) throw () \
170 for (size_t i = 0; i < n; i++) \
171 r[i] OP logical_value (x[i]); \
174 inline void F (size_t n, bool *r, X x) throw () \
175 { for (size_t i = 0; i < n; i++) r[i] OP x; }
184 for (
size_t i = 0; i < n; i++)
197 for (
size_t i = 0; i < n; i++)
210 for (
size_t i = 0; i < n; i++)
223 for (
size_t i = 0; i < n; i++)
236 for (
size_t i = 0; i < n; i++)
238 if (
x[i].
imag () != 0)
245 #define DEFMXMAPPER(F, FUN) \
247 inline void F (size_t n, T *r, const T *x) throw () \
248 { for (size_t i = 0; i < n; i++) r[i] = FUN (x[i]); }
252 {
for (
size_t i = 0; i < n; i++)
r[i] =
x[i].
real (); }
255 {
for (
size_t i = 0; i < n; i++)
r[i] =
x[i].
imag (); }
258 #define DEFMXMAPPER2(F, FUN) \
260 inline void F (size_t n, T *r, const T *x, const T *y) throw () \
261 { for (size_t i = 0; i < n; i++) r[i] = FUN (x[i], y[i]); } \
263 inline void F (size_t n, T *r, const T *x, T y) throw () \
264 { for (size_t i = 0; i < n; i++) r[i] = FUN (x[i], y); } \
266 inline void F (size_t n, T *r, T x, const T *y) throw () \
267 { for (size_t i = 0; i < n; i++) r[i] = FUN (x, y[i]); }
273 #define DEFMINMAXSPEC(T, F, OP) \
275 inline void F<T> (size_t n, T *r, const T *x, T y) throw () \
278 std::memcpy (r, x, n * sizeof (T)); \
280 for (size_t i = 0; i < n; i++) r[i] = (x[i] OP y) ? x[i] : y; \
283 inline void F<T> (size_t n, T *r, T x, const T *y) throw () \
286 std::memcpy (r, y, n * sizeof (T)); \
288 for (size_t i = 0; i < n; i++) r[i] = (y[i] OP x) ? y[i] : x; \
297 #define DEFMXMAPPER2X(F, FUN) \
298 template <class R, class X, class Y> \
299 inline void F (size_t n, R *r, const X *x, const Y *y) throw () \
300 { for (size_t i = 0; i < n; i++) r[i] = FUN (x[i], y[i]); } \
301 template <class R, class X, class Y> \
302 inline void F (size_t n, R *r, const X *x, Y y) throw () \
303 { for (size_t i = 0; i < n; i++) r[i] = FUN (x[i], y); } \
304 template <class R, class X, class Y> \
305 inline void F (size_t n, R *r, X x, const Y *y) throw () \
306 { for (size_t i = 0; i < n; i++) r[i] = FUN (x, y[i]); }
315 template <class
R, class X, R fun (X
x)>
317 {
for (
size_t i = 0; i < n; i++) r[i] = fun (
x[i]); }
319 template <
class R,
class X, R fun (const X& x)>
321 {
for (
size_t i = 0; i < n; i++)
r[i] = fun (
x[i]); }
326 template <
class R,
class X>
329 void (*op) (
size_t,
R *,
const X *)
throw ())
338 template <
class R,
class X, R fun (X)>
342 return do_mx_unary_op<R, X> (
x, mx_inline_map<R, X, fun>);
345 template <
class R,
class X, R fun (const X&)>
349 return do_mx_unary_op<R, X> (
x, mx_inline_map<R, X, fun>);
355 void (*op) (
size_t,
R *)
throw ())
361 template <
class R,
class X,
class Y>
364 void (*op) (
size_t,
R *,
const X *,
const Y *)
throw (),
365 void (*op1) (
size_t,
R *, X,
const Y *)
throw (),
366 void (*op2) (
size_t,
R *,
const X *, Y)
throw (),
388 template <
class R,
class X,
class Y>
391 void (*op) (
size_t,
R *,
const X *, Y)
throw ())
398 template <
class R,
class X,
class Y>
401 void (*op) (
size_t,
R *, X,
const Y *)
throw ())
408 template <
class R,
class X>
411 void (*op) (
size_t,
R *,
const X *)
throw (),
412 void (*op1) (
size_t,
R *, X)
throw (),
430 template <
class R,
class X>
433 void (*op) (
size_t,
R *, X)
throw ())
439 template <
class T1,
class T2>
443 for (
size_t i = 0; i < n; i++)
452 bool (*op) (
size_t,
const T *)
throw ())
460 inline T
cabsq (
const std::complex<T>& c)
461 {
return c.real () * c.real () + c.imag () * c.imag (); }
484 #define OP_RED_SUM(ac, el) ac += el
485 #define OP_RED_PROD(ac, el) ac *= el
486 #define OP_RED_SUMSQ(ac, el) ac += el*el
487 #define OP_RED_SUMSQC(ac, el) ac += cabsq (el)
506 #define OP_RED_ANYC(ac, el) if (xis_true (el)) { ac = true; break; } else continue
507 #define OP_RED_ALLC(ac, el) if (xis_false (el)) { ac = false; break; } else continue
509 #define OP_RED_FCN(F, TSRC, TRES, OP, ZERO) \
512 F (const TSRC* v, octave_idx_type n) \
515 for (octave_idx_type i = 0; i < n; i++) \
520 #define PROMOTE_DOUBLE(T) typename subst_template_param<std::complex, T, double>::type
533 #define OP_RED_FCN2(F, TSRC, TRES, OP, ZERO) \
536 F (const TSRC* v, TRES *r, octave_idx_type m, octave_idx_type n) \
538 for (octave_idx_type i = 0; i < m; i++) \
540 for (octave_idx_type j = 0; j < n; j++) \
542 for (octave_idx_type i = 0; i < m; i++) \
549 OP_RED_FCN2 (mx_inline_dsum, T,
PROMOTE_DOUBLE(T), op_dble_sum, 0.0)
550 OP_RED_FCN2 (mx_inline_count,
bool, T, OP_RED_SUM, 0)
551 OP_RED_FCN2 (mx_inline_prod, T, T, OP_RED_PROD, 1)
552 OP_RED_FCN2 (mx_inline_dprod, T,
PROMOTE_DOUBLE(T), op_dble_prod, 0.0)
553 OP_RED_FCN2 (mx_inline_sumsq, T, T, OP_RED_SUMSQ, 0)
554 OP_RED_FCN2 (mx_inline_sumsq,
std::complex<T>, T, OP_RED_SUMSQC, 0)
556 #define OP_RED_ANYR(ac, el) ac |= xis_true (el)
557 #define OP_RED_ALLR(ac, el) ac &= xis_true (el)
566 #define OP_ROW_SHORT_CIRCUIT(F, PRED, ZERO) \
569 F (const T* v, bool *r, octave_idx_type m, octave_idx_type n) \
572 return F ## _r (v, r, m, n); \
575 OCTAVE_LOCAL_BUFFER (octave_idx_type, iact, m); \
576 for (octave_idx_type i = 0; i < m; i++) iact[i] = i; \
577 octave_idx_type nact = m; \
578 for (octave_idx_type j = 0; j < n; j++) \
580 octave_idx_type k = 0; \
581 for (octave_idx_type i = 0; i < nact; i++) \
583 octave_idx_type ia = iact[i]; \
584 if (! PRED (v[ia])) \
590 for (octave_idx_type i = 0; i < m; i++) r[i] = ! ZERO; \
591 for (octave_idx_type i = 0; i < nact; i++) r[iact[i]] = ZERO; \
597 #define OP_RED_FCNN(F, TSRC, TRES) \
600 F (const TSRC *v, TRES *r, octave_idx_type l, \
601 octave_idx_type n, octave_idx_type u) \
605 for (octave_idx_type i = 0; i < u; i++) \
607 r[i] = F<T> (v, n); \
613 for (octave_idx_type i = 0; i < u; i++) \
632 #define OP_CUM_FCN(F, TSRC, TRES, OP) \
635 F (const TSRC *v, TRES *r, octave_idx_type n) \
639 TRES t = r[0] = v[0]; \
640 for (octave_idx_type i = 1; i < n; i++) \
641 r[i] = t = t OP v[i]; \
649 #define OP_CUM_FCN2(F, TSRC, TRES, OP) \
652 F (const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n) \
656 for (octave_idx_type i = 0; i < m; i++) \
659 for (octave_idx_type j = 1; j < n; j++) \
662 for (octave_idx_type i = 0; i < m; i++) \
663 r[i] = r0[i] OP v[i]; \
673 #define OP_CUM_FCNN(F, TSRC, TRES) \
676 F (const TSRC *v, TRES *r, octave_idx_type l, \
677 octave_idx_type n, octave_idx_type u) \
681 for (octave_idx_type i = 0; i < u; i++) \
689 for (octave_idx_type i = 0; i < u; i++) \
702 #define OP_MINMAX_FCN(F, OP) \
704 void F (const T *v, T *r, octave_idx_type n) \
708 octave_idx_type i = 1; \
711 for (; i < n && xisnan (v[i]); i++) ; \
712 if (i < n) tmp = v[i]; \
715 if (v[i] OP tmp) tmp = v[i]; \
719 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \
723 octave_idx_type tmpi = 0; \
724 octave_idx_type i = 1; \
727 for (; i < n && xisnan (v[i]); i++) ; \
728 if (i < n) { tmp = v[i]; tmpi = i; } \
731 if (v[i] OP tmp) { tmp = v[i]; tmpi = i; }\
743 #define OP_MINMAX_FCN2(F, OP) \
746 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \
750 octave_idx_type j = 0; \
751 for (octave_idx_type i = 0; i < m; i++) \
754 if (xisnan (v[i])) nan = true; \
757 while (nan && j < n) \
760 for (octave_idx_type i = 0; i < m; i++) \
764 else if (xisnan (r[i]) || v[i] OP r[i]) \
771 for (octave_idx_type i = 0; i < m; i++) \
772 if (v[i] OP r[i]) r[i] = v[i]; \
778 F (const T *v, T *r, octave_idx_type *ri, \
779 octave_idx_type m, octave_idx_type n) \
783 octave_idx_type j = 0; \
784 for (octave_idx_type i = 0; i < m; i++) \
786 r[i] = v[i]; ri[i] = j; \
787 if (xisnan (v[i])) nan = true; \
790 while (nan && j < n) \
793 for (octave_idx_type i = 0; i < m; i++) \
797 else if (xisnan (r[i]) || v[i] OP r[i]) \
798 { r[i] = v[i]; ri[i] = j; } \
804 for (octave_idx_type i = 0; i < m; i++) \
806 { r[i] = v[i]; ri[i] = j; } \
814 #define OP_MINMAX_FCNN(F) \
817 F (const T *v, T *r, octave_idx_type l, \
818 octave_idx_type n, octave_idx_type u) \
823 for (octave_idx_type i = 0; i < u; i++) \
831 for (octave_idx_type i = 0; i < u; i++) \
841 F (const T *v, T *r, octave_idx_type *ri, \
842 octave_idx_type l, octave_idx_type n, octave_idx_type u) \
847 for (octave_idx_type i = 0; i < u; i++) \
855 for (octave_idx_type i = 0; i < u; i++) \
857 F (v, r, ri, l, n); \
867 #define OP_CUMMINMAX_FCN(F, OP) \
869 void F (const T *v, T *r, octave_idx_type n) \
873 octave_idx_type i = 1; \
874 octave_idx_type j = 0; \
877 for (; i < n && xisnan (v[i]); i++) ; \
878 for (; j < i; j++) r[j] = tmp; \
879 if (i < n) tmp = v[i]; \
884 for (; j < i; j++) r[j] = tmp; \
887 for (; j < i; j++) r[j] = tmp; \
890 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \
893 T tmp = v[0]; octave_idx_type tmpi = 0; \
894 octave_idx_type i = 1; \
895 octave_idx_type j = 0; \
898 for (; i < n && xisnan (v[i]); i++) ; \
899 for (; j < i; j++) { r[j] = tmp; ri[j] = tmpi; } \
900 if (i < n) { tmp = v[i]; tmpi = i; } \
905 for (; j < i; j++) { r[j] = tmp; ri[j] = tmpi; } \
906 tmp = v[i]; tmpi = i; \
908 for (; j < i; j++) { r[j] = tmp; ri[j] = tmpi; } \
918 #define OP_CUMMINMAX_FCN2(F, OP) \
921 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \
926 octave_idx_type j = 0; \
927 for (octave_idx_type i = 0; i < m; i++) \
930 if (xisnan (v[i])) nan = true; \
932 j++; v += m; r0 = r; r += m; \
933 while (nan && j < n) \
936 for (octave_idx_type i = 0; i < m; i++) \
939 { r[i] = r0[i]; nan = true; } \
940 else if (xisnan (r0[i]) || v[i] OP r0[i]) \
945 j++; v += m; r0 = r; r += m; \
949 for (octave_idx_type i = 0; i < m; i++) \
954 j++; v += m; r0 = r; r += m; \
959 F (const T *v, T *r, octave_idx_type *ri, \
960 octave_idx_type m, octave_idx_type n) \
964 const T *r0; const octave_idx_type *r0i; \
965 octave_idx_type j = 0; \
966 for (octave_idx_type i = 0; i < m; i++) \
968 r[i] = v[i]; ri[i] = 0; \
969 if (xisnan (v[i])) nan = true; \
971 j++; v += m; r0 = r; r += m; r0i = ri; ri += m; \
972 while (nan && j < n) \
975 for (octave_idx_type i = 0; i < m; i++) \
978 { r[i] = r0[i]; ri[i] = r0i[i]; nan = true; } \
979 else if (xisnan (r0[i]) || v[i] OP r0[i]) \
980 { r[i] = v[i]; ri[i] = j; }\
982 { r[i] = r0[i]; ri[i] = r0i[i]; }\
984 j++; v += m; r0 = r; r += m; r0i = ri; ri += m; \
988 for (octave_idx_type i = 0; i < m; i++) \
990 { r[i] = v[i]; ri[i] = j; } \
992 { r[i] = r0[i]; ri[i] = r0i[i]; } \
993 j++; v += m; r0 = r; r += m; r0i = ri; ri += m; \
1000 #define OP_CUMMINMAX_FCNN(F) \
1001 template <class T> \
1003 F (const T *v, T *r, octave_idx_type l, \
1004 octave_idx_type n, octave_idx_type u) \
1009 for (octave_idx_type i = 0; i < u; i++) \
1017 for (octave_idx_type i = 0; i < u; i++) \
1025 template <class T> \
1027 F (const T *v, T *r, octave_idx_type *ri, \
1028 octave_idx_type l, octave_idx_type n, octave_idx_type u) \
1033 for (octave_idx_type i = 0; i < u; i++) \
1036 v += n; r += n; ri += n; \
1041 for (octave_idx_type i = 0; i < u; i++) \
1043 F (v, r, ri, l, n); \
1045 r += l*n; ri += l*n; \
1061 r[i] = v[i+1] - v[i];
1066 T lst = v[1] - v[0];
1069 T
dif = v[i+2] - v[i+1];
1080 buf[i] = v[i+1] - v[i];
1085 buf[i] = buf[i+1] - buf[i];
1103 r[i] = v[i+m] - v[i];
1109 r[j] = (v[j+m+m] - v[j+m]) - (v[j+m] - v[j]);
1119 buf[i] = v[i*m+j+m] - v[i*m+j];
1124 buf[i] = buf[i+1] - buf[i];
1146 v += n; r += n-order;
1180 l = 1, n = dims(dim), u = 1;
1192 template <
class R,
class T>
1201 if (dims.
length () == 2 && dims(0) == 0 && dims(1) == 0)
1207 if (dim < dims.
length ()) dims(dim) = 1;
1211 mx_red_op (src.
data (), ret.fortran_vec (), l, n, u);
1216 template <
class R,
class T>
1244 if (dim < dims.
length () && dims(dim) != 0) dims(dim) = 1;
1264 if (dim < dims.
length () && dims(dim) != 0) dims(dim) = 1;
1314 void (*mx_diff_op) (
const R *,
R *,
1325 if (dim >= dims.
length ())
1328 if (dims(dim) <= order)
1339 mx_diff_op (src.
data (), ret.fortran_vec (), l, n, u, order);
1355 T e1 = (s - (s1 - t)) + (x - t);
void mx_inline_or_not(size_t n, bool *r, const X *x, const Y *y)
T mx_inline_xsum(const T *v, octave_idx_type n)
void mx_inline_mul2(size_t n, R *r, const X *x)
void op_dble_prod(double &ac, float el)
#define PROMOTE_DOUBLE(T)
void mx_inline_add2(size_t n, R *r, const X *x)
#define DEFMINMAXSPEC(T, F, OP)
Array< R > & do_ms_inplace_op(Array< R > &r, const X &x, void(*op)(size_t, R *, X) throw())
void mx_inline_or2(size_t n, bool *r, const X *x)
void gripe_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
void mx_inline_sub2(size_t n, R *r, const X *x)
void mx_inline_cummax(const T *v, T *r, octave_idx_type n)
#define OP_MINMAX_FCN(F, OP)
void mx_inline_notzero(size_t n, bool *r, const X *x)
#define DEFMXMAPPER2(F, FUN)
void mx_inline_le(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_fill(size_t n, R *r, S s)
void mx_inline_uminus2(size_t n, R *r)
#define OP_CUM_FCN2(F, TSRC, TRES, OP)
octave_idx_type numel(void) const
Number of elements in the array.
Array< R > do_mx_diff_op(const Array< R > &src, int dim, octave_idx_type order, void(*mx_diff_op)(const R *, R *, octave_idx_type, octave_idx_type, octave_idx_type, octave_idx_type))
T cabsq(const std::complex< T > &c)
#define DEFMXBOOLOP(F, NOT1, OP, NOT2)
void mx_inline_real(size_t n, T *r, const std::complex< T > *x)
bool do_mx_check(const Array< T > &a, bool(*op)(size_t, const T *) throw())
bool mx_inline_all_finite(size_t n, const T *x)
void resize(int n, int fill_value=0)
Complex xmax(const Complex &x, const Complex &y)
double double_value(void) const
void mx_inline_cumcount(const bool *v, T *r, octave_idx_type n)
void mx_inline_map(size_t n, R *r, const X *x)
Complex xmin(const Complex &x, const Complex &y)
Array< R > do_mx_unary_op(const Array< X > &x, void(*op)(size_t, R *, const X *) throw())
void mx_inline_ne(size_t n, bool *r, const X *x, const Y *y)
T mx_inline_sumsq(const T *v, octave_idx_type n)
bool mx_inline_any_negative(size_t n, const T *x)
void mx_inline_max(const T *v, T *r, octave_idx_type n)
void mx_inline_eq(size_t n, bool *r, const X *x, const Y *y)
#define OP_RED_ALLC(ac, el)
bool mx_inline_any(const T *v, octave_idx_type n)
static void dif(octave_idx_type nt, double *root, double *dif1, double *dif2, double *dif3)
int first_non_singleton(int def=0) const
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
void mx_inline_mul(size_t n, R *r, const X *x, const Y *y)
Array< R > do_mm_binary_op(const Array< X > &x, const Array< Y > &y, void(*op)(size_t, R *, const X *, const Y *) throw(), void(*op1)(size_t, R *, X, const Y *) throw(), void(*op2)(size_t, R *, const X *, Y) throw(), const char *opname)
bool is_valid_inplace_bsxfun(const std::string &name, const dim_vector &dr, const dim_vector &dx)
void mx_inline_imag(size_t n, T *r, const std::complex< T > *x)
void mx_inline_xmin(size_t n, T *r, const T *x, const T *y)
#define OP_CUMMINMAX_FCN2(F, OP)
#define DEFMXCMPOP(F, OP)
bool mx_inline_all_real(size_t n, const std::complex< T > *x)
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
#define DEFMXUNOPEQ(F, OP)
Array< R > & do_mm_inplace_op(Array< R > &r, const Array< X > &x, void(*op)(size_t, R *, const X *) throw(), void(*op1)(size_t, R *, X) throw(), const char *opname)
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)
#define DEFMXBOOLOPEQ(F, OP)
#define OP_RED_SUMSQC(ac, el)
Array< R > & do_mx_inplace_op(Array< R > &r, void(*op)(size_t, R *) throw())
void mx_inline_and2(size_t n, bool *r, const X *x)
subst_template_param< std::complex, T, double >::type mx_inline_dprod(const T *v, octave_idx_type n)
const T * data(void) const
#define OP_CUMMINMAX_FCNN(F)
#define OP_ROW_SHORT_CIRCUIT(F, PRED, ZERO)
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
#define OP_RED_ANYC(ac, el)
bool mx_inline_any_positive(size_t n, const T *x)
void mx_inline_ge(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_cummin(const T *v, T *r, octave_idx_type n)
void mx_inline_pow(size_t n, R *r, const X *x, const Y *y)
void mx_inline_all_r(const T *v, bool *r, octave_idx_type m, octave_idx_type n)
Array< R > do_mx_red_op(const Array< T > &src, int dim, void(*mx_red_op)(const T *, R *, octave_idx_type, octave_idx_type, octave_idx_type))
Array< R > do_sm_binary_op(const X &x, const Array< Y > &y, void(*op)(size_t, R *, X, const Y *) throw())
bool mx_inline_any_nan(size_t n, const T *x)
subst_template_param< std::complex, T, double >::type mx_inline_dsum(const T *v, octave_idx_type n)
#define OP_RED_ALLR(ac, el)
#define OP_MINMAX_FCNN(F)
#define OP_CUMMINMAX_FCN(F, OP)
void do_inplace_bsxfun_op(Array< R > &r, const Array< X > &x, void(*op_vv)(size_t, R *, const X *), void(*op_vs)(size_t, R *, X))
#define OP_CUM_FCN(F, TSRC, TRES, OP)
T mx_inline_sum(const T *v, octave_idx_type n)
void mx_inline_gt(size_t n, bool *r, const X *x, const Y *y)
Array< R > do_mx_cum_op(const Array< T > &src, int dim, void(*mx_cum_op)(const T *, R *, octave_idx_type, octave_idx_type, octave_idx_type))
Handles the reference counting for all the derived classes.
void mx_inline_not_or(size_t n, bool *r, const X *x, const Y *y)
octave_idx_type length(void) const
Number of elements in the array.
void mx_inline_cumprod(const T *v, T *r, octave_idx_type n)
void mx_inline_and(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_not_and(size_t n, bool *r, const X *x, const Y *y)
FloatComplexMatrix R(void) const
void mx_inline_cumsum(const T *v, T *r, octave_idx_type n)
void mx_inline_iszero(size_t n, bool *r, const X *x)
#define DEFMXBINOPEQ(F, OP)
#define OP_RED_SUMSQ(ac, el)
void mx_inline_or(size_t n, bool *r, const X *x, const Y *y)
Array< R > do_mx_unary_map(const Array< X > &x)
void get_extent_triplet(const dim_vector &dims, int &dim, octave_idx_type &l, octave_idx_type &n, octave_idx_type &u)
#define DEFMXMAPPER2X(F, FUN)
Array< R > do_mx_cumminmax_op(const Array< R > &src, int dim, void(*mx_cumminmax_op)(const R *, R *, octave_idx_type, octave_idx_type, octave_idx_type))
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
Array< R > do_mx_minmax_op(const Array< R > &src, int dim, void(*mx_minmax_op)(const R *, R *, octave_idx_type, octave_idx_type, octave_idx_type))
Array< R > do_ms_binary_op(const Array< X > &x, const Y &y, void(*op)(size_t, R *, const X *, Y) throw())
ColumnVector imag(const ComplexColumnVector &a)
void mx_inline_add(size_t n, R *r, const X *x, const Y *y)
void mx_inline_any_r(const T *v, bool *r, octave_idx_type m, octave_idx_type n)
std::complex< float > FloatComplex
void mx_inline_and_not(size_t n, bool *r, const X *x, const Y *y)
void mx_inline_div(size_t n, R *r, const X *x, const Y *y)
#define OP_RED_FCNN(F, TSRC, TRES)
#define OP_RED_FCN(F, TSRC, TRES, OP, ZERO)
bool mx_inline_all(const T *v, octave_idx_type n)
#define OP_RED_SUM(ac, el)
std::complex< double > Complex
bool is_valid_bsxfun(const std::string &name, const dim_vector &dx, const dim_vector &dy)
const T * fortran_vec(void) const
void mx_inline_div2(size_t n, R *r, const X *x)
#define DEFMXBINOP(F, OP)
void mx_inline_not(size_t n, bool *r, const X *x)
#define OP_CUM_FCNN(F, TSRC, TRES)
ColumnVector real(const ComplexColumnVector &a)
void mx_inline_lt(size_t n, bool *r, const X *x, const Y *y)
bool mx_inline_equal(size_t n, const T1 *x, const T2 *y)
#define OP_MINMAX_FCN2(F, OP)
void op_dble_sum(double &ac, float el)
#define OP_RED_PROD(ac, el)
void chop_trailing_singletons(void)
void mx_inline_not2(size_t n, bool *r)
#define DEFMXUNBOOLOP(F, OP)
T mx_inline_prod(const T *v, octave_idx_type n)
void twosum_accum(T &s, T &e, const T &x)
F77_RET_T const double * x
void mx_inline_diff(const T *v, T *r, octave_idx_type n, octave_idx_type order)
void mx_inline_xmax(size_t n, T *r, const T *x, const T *y)
Array< R > do_bsxfun_op(const Array< X > &x, const Array< Y > &y, void(*op_vv)(size_t, R *, const X *, const Y *), void(*op_sv)(size_t, R *, X, const Y *), void(*op_vs)(size_t, R *, const X *, Y))
T mx_inline_count(const bool *v, octave_idx_type n)
void mx_inline_min(const T *v, T *r, octave_idx_type n)