60 double val =
static_cast<double>
70 double val =
static_cast<double> (pa[i]);
81 ptmp[i] = static_cast<double>
82 (pa[i] + static_cast<octave_idx_type> (1));
85 ptmp[i] = static_cast<double> (pa[i]);
94 xelem (i) =
static_cast<unsigned char> (a(i));
97 #if defined (HAVE_FFTW)
104 if (dim > dv.
length () || dim < 0)
110 for (
int i = 0; i < dim; i++)
114 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
125 n, howmany, stride, dist);
135 if (dim > dv.
length () || dim < 0)
141 for (
int i = 0; i < dim; i++)
145 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
155 n, howmany, stride, dist);
223 Complex *out (retval.fortran_vec ());
246 F77_FUNC (
zfftb, ZFFTB) (
const octave_idx_type&, Complex*, Complex*);
254 if (dim > dv.
length () || dim < 0)
261 Complex *pwsave = wsave.fortran_vec ();
267 for (
int i = 0; i < dim; i++)
271 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
284 tmp[i] =
elem ((i + k*npts)*stride + j*dist);
289 retval((i + k*npts)*stride + j*dist) = tmp[i];
301 if (dim > dv.
length () || dim < 0)
308 Complex *pwsave = wsave.fortran_vec ();
314 for (
int i = 0; i < dim; i++)
318 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
331 tmp[i] =
elem ((i + k*npts)*stride + j*dist);
336 retval((i + k*npts)*stride + j*dist) = tmp[i] /
337 static_cast<double> (npts);
353 for (
int i = 0; i < rank; i++)
358 Complex *pwsave = wsave.fortran_vec ();
363 howmany = (stride == 1 ? howmany :
364 (howmany > stride ? stride : howmany));
377 prow[l] = retval((l + k*npts)*stride + j*dist);
382 retval((l + k*npts)*stride + j*dist) = prow[l];
401 for (
int i = 0; i < rank; i++)
406 Complex *pwsave = wsave.fortran_vec ();
411 howmany = (stride == 1 ? howmany :
412 (howmany > stride ? stride : howmany));
425 prow[l] = retval((l + k*npts)*stride + j*dist);
430 retval((l + k*npts)*stride + j*dist) =
431 prow[l] / static_cast<double> (npts);
449 for (
int i = 0; i < rank; i++)
454 Complex *pwsave = wsave.fortran_vec ();
459 howmany = (stride == 1 ? howmany :
460 (howmany > stride ? stride : howmany));
473 prow[l] = retval((l + k*npts)*stride + j*dist);
478 retval((l + k*npts)*stride + j*dist) = prow[l];
496 for (
int i = 0; i < rank; i++)
501 Complex *pwsave = wsave.fortran_vec ();
506 howmany = (stride == 1 ? howmany :
507 (howmany > stride ? stride : howmany));
520 prow[l] = retval((l + k*npts)*stride + j*dist);
525 retval((l + k*npts)*stride + j*dist) =
526 prow[l] / static_cast<double> (npts);
611 double val =
elem (i);
643 return do_mx_red_op<bool, double> (*
this, dim,
mx_inline_all);
649 return do_mx_red_op<bool, double> (*
this, dim,
mx_inline_any);
673 return do_mx_red_op<double, double> (*
this, dim,
mx_inline_sum);
697 return do_mx_minmax_op<double> (*
this, idx_arg, dim,
mx_inline_max);
709 return do_mx_minmax_op<double> (*
this, idx_arg, dim,
mx_inline_min);
755 retval.
insert (rb, ra_idx);
771 (*current_liboctave_error_handler)
772 (
"invalid conversion from NaN to character");
783 retval.
elem (i) =
static_cast<char>(ival);
787 if (rb.
numel () == 0)
790 retval.
insert (rb, ra_idx);
823 return do_mx_unary_map<double, double, std::abs> (*this);
829 return do_mx_unary_map<bool, double, xisnan> (*this);
835 return do_mx_unary_map<bool, double, xisinf> (*this);
841 return do_mx_unary_map<bool, double, xfinite> (*this);
853 (
"invalid conversion of NDArray to Matrix");
910 tmp = octave_read_value<double> (is);