52 xelem (i) =
static_cast<unsigned char> (a(i));
55 #if defined (HAVE_FFTW)
62 if (dim > dv.
length () || dim < 0)
68 for (
int i = 0; i < dim; i++)
72 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
83 n, howmany, stride, dist);
93 if (dim > dv.
length () || dim < 0)
99 for (
int i = 0; i < dim; i++)
103 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
113 n, howmany, stride, dist);
205 F77_FUNC (
cfftb, CFFTB) (
const octave_idx_type&, FloatComplex*,
214 if (dim > dv.
length () || dim < 0)
227 for (
int i = 0; i < dim; i++)
231 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
244 tmp[i] =
elem ((i + k*npts)*stride + j*dist);
249 retval((i + k*npts)*stride + j*dist) = tmp[i];
261 if (dim > dv.
length () || dim < 0)
274 for (
int i = 0; i < dim; i++)
278 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
291 tmp[i] =
elem ((i + k*npts)*stride + j*dist);
296 retval((i + k*npts)*stride + j*dist) = tmp[i] /
297 static_cast<float> (npts);
313 for (
int i = 0; i < rank; i++)
323 howmany = (stride == 1 ? howmany :
324 (howmany > stride ? stride : howmany));
337 prow[l] = retval((l + k*npts)*stride + j*dist);
342 retval((l + k*npts)*stride + j*dist) = prow[l];
361 for (
int i = 0; i < rank; i++)
371 howmany = (stride == 1 ? howmany :
372 (howmany > stride ? stride : howmany));
385 prow[l] = retval((l + k*npts)*stride + j*dist);
390 retval((l + k*npts)*stride + j*dist) =
391 prow[l] / static_cast<float> (npts);
409 for (
int i = 0; i < rank; i++)
419 howmany = (stride == 1 ? howmany :
420 (howmany > stride ? stride : howmany));
433 prow[l] = retval((l + k*npts)*stride + j*dist);
438 retval((l + k*npts)*stride + j*dist) = prow[l];
456 for (
int i = 0; i < rank; i++)
466 howmany = (stride == 1 ? howmany :
467 (howmany > stride ? stride : howmany));
480 prow[l] = retval((l + k*npts)*stride + j*dist);
485 retval((l + k*npts)*stride + j*dist) =
486 prow[l] / static_cast<float> (npts);
571 float val =
elem (i);
603 return do_mx_red_op<bool, float> (*
this, dim,
mx_inline_all);
609 return do_mx_red_op<bool, float> (*
this, dim,
mx_inline_any);
639 return do_mx_red_op<float, float> (*
this, dim,
mx_inline_sum);
663 return do_mx_minmax_op<float> (*
this, idx_arg, dim,
mx_inline_max);
675 return do_mx_minmax_op<float> (*
this, idx_arg, dim,
mx_inline_min);
723 retval.
insert (rb, ra_idx);
740 (*current_liboctave_error_handler)
741 (
"invalid conversion from NaN to character");
752 retval.
elem (i) =
static_cast<char>(ival);
756 if (rb.
numel () == 0)
759 retval.
insert (rb, ra_idx);
794 return do_mx_unary_map<float, float, std::abs> (*this);
800 return do_mx_unary_map<bool, float, xisnan> (*this);
806 return do_mx_unary_map<bool, float, xisinf> (*this);
812 return do_mx_unary_map<bool, float, xfinite> (*this);
867 tmp = octave_read_value<float> (is);
octave_idx_type compute_index(octave_idx_type n, const dim_vector &dims)
FloatNDArray concat(const FloatNDArray &rb, const Array< octave_idx_type > &ra_idx)
FloatComplexNDArray fourier(int dim=1) const
NDArray dsum(int dim=-1) const
#define NDS_BOOL_OPS(ND, S)
#define NDS_CMP_OPS(ND, S)
bool all_integers(void) const
bool all_elements_are_int_or_inf_or_nan(void) const
boolNDArray operator!(void) const
void mx_inline_cummax(const T *v, T *r, octave_idx_type n)
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)
FloatNDArray diff(octave_idx_type order=1, int dim=-1) const
#define BSXFUN_OP_DEF_MXLOOP(OP, ARRAY, LOOP)
FloatNDArray max(int dim=-1) const
octave_idx_type numel(void) const
Number of elements in the array.
static octave_idx_type nn
FloatNDArray cumsum(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)
#define MINMAX_FCNS(T, S)
bool xnegative_sign(double x)
FloatNDArray diag(octave_idx_type k=0) const
Array< T > diag(octave_idx_type k=0) const
Get the kth super or subdiagonal.
std::istream & operator>>(std::istream &is, FloatNDArray &a)
FloatNDArray sumsq(int dim=-1) const
bool any_element_is_nan(void) const
float & elem(octave_idx_type n)
FloatComplexNDArray ifourier(int dim=1) const
T mx_inline_sumsq(const T *v, octave_idx_type n)
bool mx_inline_any_negative(size_t n, const T *x)
bool all_elements_are_zero(void) const
void mx_inline_max(const T *v, T *r, octave_idx_type n)
subroutine cfftb(n, c, wsave)
FloatComplexNDArray & insert(const NDArray &a, octave_idx_type r, octave_idx_type c)
bool mx_inline_any(const T *v, octave_idx_type n)
F77_RET_T const double const double double * d
FloatNDArray abs(void) const
FloatNDArray sum(int dim=-1) const
static int fftNd(const double *, Complex *, const int, const dim_vector &)
FloatComplexNDArray ifourierNd(void) const
FloatComplexNDArray fourier2d(void) const
void mx_inline_imag(size_t n, T *r, const std::complex< T > *x)
boolNDArray any(int dim=-1) const
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.
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
subroutine cffti(n, wsave)
FloatComplexNDArray ifourier2d(void) const
#define NDND_CMP_OPS(ND1, ND2)
static octave_idx_type compute_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions)
#define NDND_BOOL_OPS(ND1, ND2)
bool any_element_is_positive(bool=false) const
subst_template_param< std::complex, T, double >::type mx_inline_dprod(const T *v, octave_idx_type n)
void gripe_nan_to_logical_conversion(void)
FloatNDArray real(const FloatComplexNDArray &a)
bool any_element_not_one_or_zero(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)
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
subroutine cfftf(n, c, wsave)
#define SND_BOOL_OPS(S, ND)
bool mx_inline_any_positive(size_t n, const T *x)
FloatNDArray prod(int dim=-1) const
FloatComplexNDArray fourierNd(void) const
FloatNDArray imag(const FloatComplexNDArray &a)
void mx_inline_cummin(const T *v, T *r, octave_idx_type n)
bool any_element_is_negative(bool=false) const
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)
subst_template_param< std::complex, T, double >::type mx_inline_dsum(const T *v, octave_idx_type n)
static int ifftNd(const Complex *, Complex *, const int, const dim_vector &)
#define BSXFUN_STDREL_DEFS_MXLOOP(ARRAY)
float & xelem(octave_idx_type n)
bool any_element_is_inf_or_nan(void) const
T mx_inline_sum(const T *v, octave_idx_type n)
bool too_large_for_float(void) const
charNDArray & insert(const charNDArray &a, octave_idx_type r, octave_idx_type c)
bool test_all(F fcn) const
FloatNDArray max(float d, const FloatNDArray &m)
FloatNDArray cumprod(int dim=-1) const
void mx_inline_cumprod(const T *v, T *r, octave_idx_type n)
boolNDArray isnan(void) const
bool xisinteger(double x)
void octave_write_float(std::ostream &os, float d)
boolNDArray all(int dim=-1) const
void mx_inline_cumsum(const T *v, T *r, octave_idx_type n)
bool xpositive_sign(double x)
FloatNDArray cummin(int dim=-1) const
F77_RET_T F77_FUNC(zgemv, ZGEMV)(F77_CONST_CHAR_ARG_DECL
boolNDArray isinf(void) const
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
#define BSXFUN_OP2_DEF_MXLOOP(OP, ARRAY, ARRAY1, ARRAY2, LOOP)
FloatNDArray & insert(const FloatNDArray &a, octave_idx_type r, octave_idx_type c)
std::complex< float > FloatComplex
FloatNDArray cummax(int dim=-1) const
std::ostream & operator<<(std::ostream &os, const FloatNDArray &a)
bool mx_inline_all(const T *v, octave_idx_type n)
#define BSXFUN_STDOP_DEFS_MXLOOP(ARRAY)
const float * fortran_vec(void) const
octave_idx_type NINTbig(double x)
void mx_inline_not(size_t n, bool *r, const X *x)
static void increment_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions, int start_dimension=0)
FloatComplexRowVector row(octave_idx_type i) const
FloatNDArray min(int dim=-1) const
T mx_inline_prod(const T *v, octave_idx_type n)
bool xis_one_or_zero(double x)
NDArray dprod(int dim=-1) 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)
void mx_inline_min(const T *v, T *r, octave_idx_type n)
boolNDArray isfinite(void) const