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);
896 tmp = octave_read_value<double> (is);
T mx_inline_xsum(const T *v, octave_idx_type n)
void octave_write_double(std::ostream &os, double d)
octave_idx_type compute_index(octave_idx_type n, const dim_vector &dims)
bool any_element_is_negative(bool=false) const
NDArray cumsum(int dim=-1) const
#define NDS_BOOL_OPS(ND, S)
#define NDS_CMP_OPS(ND, S)
void mx_inline_cummax(const T *v, T *r, octave_idx_type n)
std::istream & operator>>(std::istream &is, NDArray &a)
static int fft(const double *in, Complex *out, size_t npts, size_t nsamples=1, octave_idx_type stride=1, octave_idx_type dist=-1)
const octave_base_value const Array< octave_idx_type > & ra_idx
#define SND_CMP_OPS(S, ND)
#define BSXFUN_OP_DEF_MXLOOP(OP, ARRAY, LOOP)
octave_idx_type numel(void) const
Number of elements in the array.
subroutine zffti(n, wsave)
static octave_idx_type nn
NDArray max(double d, const NDArray &m)
NDArray sumsq(int dim=-1) const
void mx_inline_real(size_t n, T *r, const std::complex< T > *x)
bool mx_inline_all_finite(size_t n, const T *x)
NDArray prod(int dim=-1) const
#define MINMAX_FCNS(T, S)
bool all_elements_are_zero(void) const
bool xnegative_sign(double x)
Array< T > diag(octave_idx_type k=0) const
Get the kth super or subdiagonal.
ComplexRowVector row(octave_idx_type i) const
double & elem(octave_idx_type n)
double lo_ieee_nan_value(void)
T mx_inline_sumsq(const T *v, octave_idx_type n)
std::ostream & operator<<(std::ostream &os, const NDArray &a)
bool mx_inline_any_negative(size_t n, const T *x)
boolNDArray isnan(void) const
NDArray cumprod(int dim=-1) const
bool any_element_is_nan(void) const
void mx_inline_max(const T *v, T *r, octave_idx_type n)
bool mx_inline_any(const T *v, octave_idx_type n)
F77_RET_T const double const double double * d
NDArray imag(const ComplexNDArray &a)
subroutine zfftb(n, c, wsave)
static int fftNd(const double *, Complex *, const int, const dim_vector &)
NDArray concat(const NDArray &rb, const Array< octave_idx_type > &ra_idx)
void mx_inline_imag(size_t n, T *r, const std::complex< T > *x)
Array< T > & insert(const Array< T > &a, const Array< octave_idx_type > &idx)
Insert an array into another at a specified position.
octave_idx_type nelem(void) const
Number of elements in the array.
bool any_element_not_one_or_zero(void) const
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
NDArray min(int dim=-1) const
ComplexNDArray fourierNd(void) const
#define NDND_CMP_OPS(ND1, ND2)
NDArray real(const ComplexNDArray &a)
bool test_any(F fcn) const
Simpler calls.
ComplexNDArray & insert(const NDArray &a, octave_idx_type r, octave_idx_type c)
#define NDND_BOOL_OPS(ND1, ND2)
ComplexNDArray ifourier(int dim=1) const
NDArray & insert(const NDArray &a, octave_idx_type r, octave_idx_type c)
void gripe_nan_to_logical_conversion(void)
bool any_element_is_positive(bool=false) const
ComplexNDArray ifourier2d(void) const
static int ifft(const Complex *in, Complex *out, size_t npts, size_t nsamples=1, octave_idx_type stride=1, octave_idx_type dist=-1)
NDArray cummax(int dim=-1) const
void resize(const dim_vector &dv, const double &rfv)
static octave_idx_type compute_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions)
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
#define SND_BOOL_OPS(S, ND)
bool mx_inline_any_positive(size_t n, const T *x)
NDArray max(int dim=-1) const
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)
bool mx_inline_any_nan(size_t n, const T *x)
static int ifftNd(const Complex *, Complex *, const int, const dim_vector &)
#define BSXFUN_STDREL_DEFS_MXLOOP(ARRAY)
double & xelem(octave_idx_type n)
T mx_inline_sum(const T *v, octave_idx_type n)
bool all_elements_are_int_or_inf_or_nan(void) const
charNDArray & insert(const charNDArray &a, octave_idx_type r, octave_idx_type c)
bool test_all(F fcn) const
boolNDArray all(int dim=-1) const
NDArray cummin(int dim=-1) const
static void increment_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions, int start_dimension=0)
void mx_inline_cumprod(const T *v, T *r, octave_idx_type n)
NDArray sum(int dim=-1) const
boolNDArray any(int dim=-1) const
NDArray diag(octave_idx_type k=0) const
bool xisinteger(double x)
void mx_inline_cumsum(const T *v, T *r, octave_idx_type n)
boolNDArray isfinite(void) const
bool xpositive_sign(double x)
ComplexNDArray fourier(int dim=1) const
bool all_integers(void) const
F77_RET_T F77_FUNC(zgemv, ZGEMV)(F77_CONST_CHAR_ARG_DECL
ComplexNDArray fourier2d(void) const
bool any_element_is_inf_or_nan(void) const
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
#define BSXFUN_OP2_DEF_MXLOOP(OP, ARRAY, ARRAY1, ARRAY2, LOOP)
bool xtoo_large_for_float(double x)
ComplexNDArray ifourierNd(void) const
bool mx_inline_all(const T *v, octave_idx_type n)
#define BSXFUN_STDOP_DEFS_MXLOOP(ARRAY)
std::complex< double > Complex
const T * fortran_vec(void) const
octave_idx_type NINTbig(double x)
void mx_inline_not(size_t n, bool *r, const X *x)
T mx_inline_prod(const T *v, octave_idx_type n)
bool xis_one_or_zero(double x)
NDArray diff(octave_idx_type order=1, int dim=-1) const
subroutine zfftf(n, c, wsave)
NDArray xsum(int dim=-1) const
bool too_large_for_float(void) const
boolNDArray isinf(void) const
void mx_inline_diff(const T *v, T *r, octave_idx_type n, octave_idx_type order)
bool xis_int_or_inf_or_nan(double x)
boolNDArray operator!(void) const
void mx_inline_min(const T *v, T *r, octave_idx_type n)