25 #if ! defined (octave_mx_inlines_h)
26 #define octave_mx_inlines_h 1
49 template <
typename R,
typename S>
52 for (
size_t i = 0;
i < n;
i++)
56 #define DEFMXUNOP(F, OP) \
57 template <typename R, typename X> \
58 inline void F (size_t n, R *r, const X *x) throw () \
60 for (size_t i = 0; i < n; i++) \
66 #define DEFMXUNOPEQ(F, OP) \
67 template <typename R> \
68 inline void F (size_t n, R *r) throw () \
70 for (size_t i = 0; i < n; i++) \
76 #define DEFMXUNBOOLOP(F, OP) \
77 template <typename X> \
78 inline void F (size_t n, bool *r, const X *x) throw () \
80 const X zero = X (); \
81 for (size_t i = 0; i < n; i++) \
82 r[i] = x[i] OP zero; \
88 #define DEFMXBINOP(F, OP) \
89 template <typename R, typename X, typename Y> \
90 inline void F (size_t n, R *r, const X *x, const Y *y) throw () \
92 for (size_t i = 0; i < n; i++) \
93 r[i] = x[i] OP y[i]; \
95 template <typename R, typename X, typename Y> \
96 inline void F (size_t n, R *r, const X *x, Y y) throw () \
98 for (size_t i = 0; i < n; i++) \
101 template <typename R, typename X, typename Y> \
102 inline void F (size_t n, R *r, X x, const Y *y) throw () \
104 for (size_t i = 0; i < n; i++) \
113 #define DEFMXBINOPEQ(F, OP) \
114 template <typename R, typename X> \
115 inline void F (size_t n, R *r, const X *x) throw () \
117 for (size_t i = 0; i < n; i++) \
120 template <typename R, typename X> \
121 inline void F (size_t n, R *r, X x) throw () \
123 for (size_t i = 0; i < n; i++) \
132 #define DEFMXCMPOP(F, OP) \
133 template <typename X, typename Y> \
134 inline void F (size_t n, bool *r, const X *x, const Y *y) throw () \
136 for (size_t i = 0; i < n; i++) \
137 r[i] = x[i] OP y[i]; \
139 template <typename X, typename Y> \
140 inline void F (size_t n, bool *r, const X *x, Y y) throw () \
142 for (size_t i = 0; i < n; i++) \
145 template <typename X, typename Y> \
146 inline void F (size_t n, bool *r, X x, const Y *y) throw () \
148 for (size_t i = 0; i < n; i++) \
160 template <typename T>
167 template <
typename T>
171 return x.real () != 0 || x.imag () != 0;
174 template <
typename T>
181 template <
typename X>
184 for (
size_t i = 0;
i < n;
i++)
190 for (
size_t i = 0;
i < n;
i++)
194 #define DEFMXBOOLOP(F, NOT1, OP, NOT2) \
195 template <typename X, typename Y> \
196 inline void F (size_t n, bool *r, const X *x, const Y *y) throw () \
198 for (size_t i = 0; i < n; i++) \
199 r[i] = ((NOT1 logical_value (x[i])) \
200 OP (NOT2 logical_value (y[i]))); \
202 template <typename X, typename Y> \
203 inline void F (size_t n, bool *r, const X *x, Y y) throw () \
205 const bool yy = (NOT2 logical_value (y)); \
206 for (size_t i = 0; i < n; i++) \
207 r[i] = (NOT1 logical_value (x[i])) OP yy; \
209 template <typename X, typename Y> \
210 inline void F (size_t n, bool *r, X x, const Y *y) throw () \
212 const bool xx = (NOT1 logical_value (x)); \
213 for (size_t i = 0; i < n; i++) \
214 r[i] = xx OP (NOT2 logical_value (y[i])); \
224 #define DEFMXBOOLOPEQ(F, OP) \
225 template <typename X> \
226 inline void F (size_t n, bool *r, const X *x) throw () \
228 for (size_t i = 0; i < n; i++) \
229 r[i] OP logical_value (x[i]); \
231 template <typename X> \
232 inline void F (size_t n, bool *r, X x) throw () \
234 for (size_t i = 0; i < n; i++) \
241 template <typename T>
245 for (
size_t i = 0;
i < n;
i++)
254 template <
typename T>
258 for (
size_t i = 0;
i < n;
i++)
267 template <
typename T>
271 for (
size_t i = 0;
i < n;
i++)
280 template <
typename T>
284 for (
size_t i = 0;
i < n;
i++)
293 template <
typename T>
297 for (
size_t i = 0;
i < n;
i++)
306 #define DEFMXMAPPER(F, FUN) \
307 template <typename T> \
308 inline void F (size_t n, T *r, const T *x) throw () \
310 for (size_t i = 0; i < n; i++) \
314 template <
typename T>
317 for (
size_t i = 0;
i < n;
i++)
321 template <
typename T>
324 for (
size_t i = 0;
i < n;
i++)
329 #define DEFMXMAPPER2(F, FUN) \
330 template <typename T> \
331 inline void F (size_t n, T *r, const T *x, const T *y) throw () \
333 for (size_t i = 0; i < n; i++) \
334 r[i] = FUN (x[i], y[i]); \
336 template <typename T> \
337 inline void F (size_t n, T *r, const T *x, T y) throw () \
339 for (size_t i = 0; i < n; i++) \
340 r[i] = FUN (x[i], y); \
342 template <typename T> \
343 inline void F (size_t n, T *r, T x, const T *y) throw () \
345 for (size_t i = 0; i < n; i++) \
346 r[i] = FUN (x, y[i]); \
353 #define DEFMINMAXSPEC(T, F, OP) \
355 inline void F<T> (size_t n, T *r, const T *x, T y) throw () \
357 if (octave::math::isnan (y)) \
358 std::memcpy (r, x, n * sizeof (T)); \
360 for (size_t i = 0; i < n; i++) \
361 r[i] = (x[i] OP y) ? x[i] : y; \
364 inline void F<T> (size_t n, T *r, T x, const T *y) throw () \
366 if (octave::math::isnan (x)) \
367 std::memcpy (r, y, n * sizeof (T)); \
369 for (size_t i = 0; i < n; i++) \
370 r[i] = (y[i] OP x) ? y[i] : x; \
379 #define DEFMXMAPPER2X(F, FUN) \
380 template <typename R, typename X, typename Y> \
381 inline void F (size_t n, R *r, const X *x, const Y *y) throw () \
383 for (size_t i = 0; i < n; i++) \
384 r[i] = FUN (x[i], y[i]); \
386 template <typename R, typename X, typename Y> \
387 inline void F (size_t n, R *r, const X *x, Y y) throw () \
389 for (size_t i = 0; i < n; i++) \
390 r[i] = FUN (x[i], y); \
392 template <typename R, typename X, typename Y> \
393 inline void F (size_t n, R *r, X x, const Y *y) throw () \
395 for (size_t i = 0; i < n; i++) \
396 r[i] = FUN (x, y[i]); \
406 template <typename R, typename X, R fun (X
x)>
409 for (
size_t i = 0;
i < n;
i++)
413 template <
typename R,
typename X, R fun (const X& x)>
416 for (
size_t i = 0;
i < n;
i++)
423 template <
typename R,
typename X>
426 void (*op) (
size_t, R *,
const X *)
throw ())
429 op (r.numel (), r.fortran_vec (), x.
data ());
435 template <
typename R,
typename X, R fun (X)>
439 return do_mx_unary_op<R, X> (
x, mx_inline_map<R, X, fun>);
442 template <
typename R,
typename X, R fun (const X&)>
446 return do_mx_unary_op<R, X> (
x, mx_inline_map<R, X, fun>);
449 template <
typename R>
452 void (*op) (
size_t, R *)
throw ())
458 template <
typename R,
typename X,
typename Y>
461 void (*op) (
size_t, R *,
const X *,
const Y *)
throw (),
462 void (*op1) (
size_t, R *, X,
const Y *)
throw (),
463 void (*op2) (
size_t, R *,
const X *,
Y)
throw (),
482 template <
typename R,
typename X,
typename Y>
485 void (*op) (
size_t, R *,
const X *,
Y)
throw ())
492 template <
typename R,
typename X,
typename Y>
495 void (*op) (
size_t, R *, X,
const Y *)
throw ())
502 template <
typename R,
typename X>
505 void (*op) (
size_t, R *,
const X *)
throw (),
506 void (*op1) (
size_t, R *, X)
throw (),
521 template <
typename R,
typename X>
524 void (*op) (
size_t, R *, X)
throw ())
530 template <
typename T1,
typename T2>
534 for (
size_t i = 0;
i < n;
i++)
540 template <
typename T>
543 bool (*op) (
size_t,
const T *)
throw ())
550 template <
typename T>
551 inline T
cabsq (
const std::complex<T>&
c)
553 return c.real () * c.real () + c.imag () * c.imag ();
557 template <
typename T>
564 template <
typename T>
572 template <
typename T>
579 template <
typename T>
636 #define OP_RED_SUM(ac, el) ac += el
637 #define OP_RED_PROD(ac, el) ac *= el
638 #define OP_RED_SUMSQ(ac, el) ac += el*el
639 #define OP_RED_SUMSQC(ac, el) ac += cabsq (el)
654 template <
typename T>
674 template <
typename T>
682 #define OP_RED_ANYC(ac, el) \
691 #define OP_RED_ALLC(ac, el) \
692 if (xis_false (el)) \
700 #define OP_RED_FCN(F, TSRC, TRES, OP, ZERO) \
701 template <typename T> \
703 F (const TSRC* v, octave_idx_type n) \
706 for (octave_idx_type i = 0; i < n; i++) \
711 #define PROMOTE_DOUBLE(T) \
712 typename subst_template_param<std::complex, T, double>::type
724 #define OP_RED_FCN2(F, TSRC, TRES, OP, ZERO) \
725 template <typename T> \
727 F (const TSRC* v, TRES *r, octave_idx_type m, octave_idx_type n) \
729 for (octave_idx_type i = 0; i < m; i++) \
731 for (octave_idx_type j = 0; j < n; j++) \
733 for (octave_idx_type i = 0; i < m; i++) \
740 OP_RED_FCN2 (mx_inline_dsum, T,
PROMOTE_DOUBLE(T), op_dble_sum, 0.0)
741 OP_RED_FCN2 (mx_inline_count,
bool, T, OP_RED_SUM, 0)
742 OP_RED_FCN2 (mx_inline_prod, T, T, OP_RED_PROD, 1)
743 OP_RED_FCN2 (mx_inline_dprod, T,
PROMOTE_DOUBLE(T), op_dble_prod, 0.0)
744 OP_RED_FCN2 (mx_inline_sumsq, T, T, OP_RED_SUMSQ, 0)
745 OP_RED_FCN2 (mx_inline_sumsq,
std::complex<T>, T, OP_RED_SUMSQC, 0)
747 #define OP_RED_ANYR(ac, el) ac |= xis_true (el)
748 #define OP_RED_ALLR(ac, el) ac &= xis_true (el)
758 #define OP_ROW_SHORT_CIRCUIT(F, PRED, ZERO) \
759 template <typename T> \
761 F (const T* v, bool *r, octave_idx_type m, octave_idx_type n) \
764 return F ## _r (v, r, m, n); \
767 OCTAVE_LOCAL_BUFFER (octave_idx_type, iact, m); \
768 for (octave_idx_type i = 0; i < m; i++) iact[i] = i; \
769 octave_idx_type nact = m; \
770 for (octave_idx_type j = 0; j < n; j++) \
772 octave_idx_type k = 0; \
773 for (octave_idx_type i = 0; i < nact; i++) \
775 octave_idx_type ia = iact[i]; \
776 if (! PRED (v[ia])) \
782 for (octave_idx_type i = 0; i < m; i++) r[i] = ! ZERO; \
783 for (octave_idx_type i = 0; i < nact; i++) r[iact[i]] = ZERO; \
789 #define OP_RED_FCNN(F, TSRC, TRES) \
790 template <typename T> \
792 F (const TSRC *v, TRES *r, octave_idx_type l, \
793 octave_idx_type n, octave_idx_type u) \
797 for (octave_idx_type i = 0; i < u; i++) \
799 r[i] = F<T> (v, n); \
805 for (octave_idx_type i = 0; i < u; i++) \
824 #define OP_CUM_FCN(F, TSRC, TRES, OP) \
825 template <typename T> \
827 F (const TSRC *v, TRES *r, octave_idx_type n) \
831 TRES t = r[0] = v[0]; \
832 for (octave_idx_type i = 1; i < n; i++) \
833 r[i] = t = t OP v[i]; \
841 #define OP_CUM_FCN2(F, TSRC, TRES, OP) \
842 template <typename T> \
844 F (const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n) \
848 for (octave_idx_type i = 0; i < m; i++) \
851 for (octave_idx_type j = 1; j < n; j++) \
854 for (octave_idx_type i = 0; i < m; i++) \
855 r[i] = r0[i] OP v[i]; \
865 #define OP_CUM_FCNN(F, TSRC, TRES) \
866 template <typename T> \
868 F (const TSRC *v, TRES *r, octave_idx_type l, \
869 octave_idx_type n, octave_idx_type u) \
873 for (octave_idx_type i = 0; i < u; i++) \
882 for (octave_idx_type i = 0; i < u; i++) \
895 #define OP_MINMAX_FCN(F, OP) \
896 template <typename T> \
897 void F (const T *v, T *r, octave_idx_type n) \
902 octave_idx_type i = 1; \
903 if (octave::math::isnan (tmp)) \
905 for (; i < n && octave::math::isnan (v[i]); i++) ; \
914 template <typename T> \
915 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \
920 octave_idx_type tmpi = 0; \
921 octave_idx_type i = 1; \
922 if (octave::math::isnan (tmp)) \
924 for (; i < n && octave::math::isnan (v[i]); i++) ; \
948 #define OP_MINMAX_FCN2(F, OP) \
949 template <typename T> \
951 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \
956 octave_idx_type j = 0; \
957 for (octave_idx_type i = 0; i < m; i++) \
960 if (octave::math::isnan (v[i])) \
965 while (nan && j < n) \
968 for (octave_idx_type i = 0; i < m; i++) \
970 if (octave::math::isnan (v[i])) \
972 else if (octave::math::isnan (r[i]) || v[i] OP r[i]) \
980 for (octave_idx_type i = 0; i < m; i++) \
987 template <typename T> \
989 F (const T *v, T *r, octave_idx_type *ri, \
990 octave_idx_type m, octave_idx_type n) \
995 octave_idx_type j = 0; \
996 for (octave_idx_type i = 0; i < m; i++) \
1000 if (octave::math::isnan (v[i])) \
1005 while (nan && j < n) \
1008 for (octave_idx_type i = 0; i < m; i++) \
1010 if (octave::math::isnan (v[i])) \
1012 else if (octave::math::isnan (r[i]) || v[i] OP r[i]) \
1023 for (octave_idx_type i = 0; i < m; i++) \
1037 #define OP_MINMAX_FCNN(F) \
1038 template <typename T> \
1040 F (const T *v, T *r, octave_idx_type l, \
1041 octave_idx_type n, octave_idx_type u) \
1047 for (octave_idx_type i = 0; i < u; i++) \
1056 for (octave_idx_type i = 0; i < u; i++) \
1064 template <typename T> \
1066 F (const T *v, T *r, octave_idx_type *ri, \
1067 octave_idx_type l, octave_idx_type n, octave_idx_type u) \
1072 for (octave_idx_type i = 0; i < u; i++) \
1082 for (octave_idx_type i = 0; i < u; i++) \
1084 F (v, r, ri, l, n); \
1095 #define OP_CUMMINMAX_FCN(F, OP) \
1096 template <typename T> \
1097 void F (const T *v, T *r, octave_idx_type n) \
1102 octave_idx_type i = 1; \
1103 octave_idx_type j = 0; \
1104 if (octave::math::isnan (tmp)) \
1106 for (; i < n && octave::math::isnan (v[i]); i++) ; \
1107 for (; j < i; j++) \
1112 for (; i < n; i++) \
1115 for (; j < i; j++) \
1119 for (; j < i; j++) \
1122 template <typename T> \
1123 void F (const T *v, T *r, octave_idx_type *ri, octave_idx_type n) \
1128 octave_idx_type tmpi = 0; \
1129 octave_idx_type i = 1; \
1130 octave_idx_type j = 0; \
1131 if (octave::math::isnan (tmp)) \
1133 for (; i < n && octave::math::isnan (v[i]); i++) ; \
1134 for (; j < i; j++) \
1145 for (; i < n; i++) \
1148 for (; j < i; j++) \
1156 for (; j < i; j++) \
1170 #define OP_CUMMINMAX_FCN2(F, OP) \
1171 template <typename T> \
1173 F (const T *v, T *r, octave_idx_type m, octave_idx_type n) \
1179 octave_idx_type j = 0; \
1180 for (octave_idx_type i = 0; i < m; i++) \
1183 if (octave::math::isnan (v[i])) \
1190 while (nan && j < n) \
1193 for (octave_idx_type i = 0; i < m; i++) \
1195 if (octave::math::isnan (v[i])) \
1200 else if (octave::math::isnan (r0[i]) || v[i] OP r0[i]) \
1212 for (octave_idx_type i = 0; i < m; i++) \
1213 if (v[i] OP r0[i]) \
1223 template <typename T> \
1225 F (const T *v, T *r, octave_idx_type *ri, \
1226 octave_idx_type m, octave_idx_type n) \
1232 const octave_idx_type *r0i; \
1233 octave_idx_type j = 0; \
1234 for (octave_idx_type i = 0; i < m; i++) \
1236 r[i] = v[i]; ri[i] = 0; \
1237 if (octave::math::isnan (v[i])) \
1246 while (nan && j < n) \
1249 for (octave_idx_type i = 0; i < m; i++) \
1251 if (octave::math::isnan (v[i])) \
1257 else if (octave::math::isnan (r0[i]) || v[i] OP r0[i]) \
1277 for (octave_idx_type i = 0; i < m; i++) \
1278 if (v[i] OP r0[i]) \
1300 #define OP_CUMMINMAX_FCNN(F) \
1301 template <typename T> \
1303 F (const T *v, T *r, octave_idx_type l, \
1304 octave_idx_type n, octave_idx_type u) \
1310 for (octave_idx_type i = 0; i < u; i++) \
1319 for (octave_idx_type i = 0; i < u; i++) \
1327 template <typename T> \
1329 F (const T *v, T *r, octave_idx_type *ri, \
1330 octave_idx_type l, octave_idx_type n, octave_idx_type u) \
1336 for (octave_idx_type i = 0; i < u; i++) \
1346 for (octave_idx_type i = 0; i < u; i++) \
1348 F (v, r, ri, l, n); \
1359 template <typename T>
1367 r[
i] = v[
i+1] - v[
i];
1372 T lst = v[1] - v[0];
1375 T
dif = v[
i+2] - v[
i+1];
1386 buf[
i] = v[
i+1] - v[
i];
1391 buf[
i] = buf[
i+1] - buf[
i];
1400 template <
typename T>
1409 r[
i] = v[
i+m] - v[
i];
1415 r[j] = (v[j+m+m] - v[j+m]) - (v[j+
m] - v[j]);
1425 buf[
i] = v[
i*m+j+m] - v[
i*m+j];
1430 buf[
i] = buf[
i+1] - buf[
i];
1440 template <
typename T>
1452 v += n; r += n-order;
1486 l = 1, n =
dims(dim), u = 1;
1498 template <
typename R,
typename T>
1517 mx_red_op (src.
data (), ret.fortran_vec (), l, n,
u);
1522 template <
typename R,
typename T>
1539 template <
typename R>
1559 template <
typename R>
1582 template <
typename R>
1598 template <
typename R>
1617 template <
typename R>
1620 void (*mx_diff_op) (
const R *, R *,
1631 if (dim >= dims.
ndims ())
1634 if (
dims(dim) <= order)
1645 mx_diff_op (src.
data (), ret.fortran_vec (), l, n,
u, order);
1655 template <
typename T>
1661 T e1 = (s - (s1 -
t)) + (x -
t);
1666 template <
typename T>
1678 template <
typename 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)
Octave interface to the compression and uncompression libraries.
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)
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)
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)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
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)
double double_value(void) const
OCTAVE_EXPORT octave_value_list return the value of the option it must match the dimension of the state and the relative tolerance must also be a vector of the same length tem it must match the dimension of the state and the absolute tolerance must also be a vector of the same length The local error test applied at each integration step is xample roup calculate Y_a and Y _d item Given Y
void mx_inline_xmin(size_t n, T *r, const T *x, const T *y)
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
#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())
nd deftypefn *octave_map m
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)
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
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)
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
the exceeded dimensions are set to if fewer subscripts than dimensions are the exceeding dimensions are merged into the final requested dimension For consider the following dims
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))
N Dimensional Array with copy-on-write semantics.
void mx_inline_not_or(size_t n, bool *r, const X *x, const Y *y)
charNDArray max(char d, const charNDArray &m)
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)
void mx_inline_cumsum(const T *v, T *r, octave_idx_type n)
=val(i)}if ode{val(i)}occurs in table i
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)
octave_idx_type ndims(void) const
Number of dimensions.
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))
the element is set to zero In other the statement xample y
#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)
Vector representing the dimensions (size) of an Array.
#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 F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE * 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)