26 #if defined (HAVE_CONFIG_H)
60 double val =
static_cast<double>
70 double val =
static_cast<double> (pa[i]);
81 ptmp[i] =
static_cast<double>
85 ptmp[i] =
static_cast<double> (pa[i]);
90 :
MArray<double> (a.dims ())
94 xelem (i) =
static_cast<unsigned char> (a(i));
97 #if defined (HAVE_FFTW)
104 if (dim > dv.
ndims () || dim < 0)
110 for (
int i = 0; i < dim; i++)
114 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
118 const double *in (
data ());
124 octave::fftw::fft (in + k * stride *
n, out + k * stride *
n,
125 n, howmany, stride, dist);
135 if (dim > dv.
ndims () || dim < 0)
141 for (
int i = 0; i < dim; i++)
145 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
150 Complex *out (retval.fortran_vec ());
154 octave::fftw::ifft (out + k * stride *
n, out + k * stride *
n,
155 n, howmany, stride, dist);
168 const double *in =
data ();
175 octave::fftw::fftNd (in + i*dist, out + i*dist, 2, dv2);
194 octave::fftw::ifftNd (out + i*dist, out + i*dist, 2, dv2);
203 int rank = dv.
ndims ();
205 const double *in (
data ());
209 octave::fftw::fftNd (in, out, rank, dv);
218 int rank = dv.
ndims ();
225 octave::fftw::ifftNd (in, out, rank, dv);
235 octave_unused_parameter (dim);
237 (*current_liboctave_error_handler)
238 (
"support for FFTW was unavailable or disabled when liboctave was built");
246 octave_unused_parameter (dim);
248 (*current_liboctave_error_handler)
249 (
"support for FFTW was unavailable or disabled when liboctave was built");
257 (*current_liboctave_error_handler)
258 (
"support for FFTW was unavailable or disabled when liboctave was built");
266 (*current_liboctave_error_handler)
267 (
"support for FFTW was unavailable or disabled when liboctave was built");
275 (*current_liboctave_error_handler)
276 (
"support for FFTW was unavailable or disabled when liboctave was built");
284 (*current_liboctave_error_handler)
285 (
"support for FFTW was unavailable or disabled when liboctave was built");
365 double val =
elem (i);
397 return do_mx_red_op<bool, double> (*
this, dim,
mx_inline_all);
403 return do_mx_red_op<bool, double> (*
this, dim,
mx_inline_any);
427 return do_mx_red_op<double, double> (*
this, dim,
mx_inline_sum);
451 return do_mx_minmax_op<double> (*
this, idx_arg, dim,
mx_inline_max);
463 return do_mx_minmax_op<double> (*
this, idx_arg, dim,
mx_inline_min);
524 (*current_liboctave_error_handler)
525 (
"invalid conversion from NaN to character");
533 retval.
elem (i) =
static_cast<char> (ival);
572 return do_mx_unary_map<double, double, std::abs> (*
this);
578 return do_mx_unary_map<bool, double, octave::math::isnan> (*
this);
584 return do_mx_unary_map<bool, double, octave::math::isinf> (*
this);
590 return do_mx_unary_map<bool, double, octave::math::isfinite> (*
this);
629 octave::write_value<double> (os, a.
elem (i));
645 tmp = octave::read_value<double> (is);
octave_idx_type compute_index(octave_idx_type n, const dim_vector &dims)
#define BSXFUN_STDREL_DEFS_MXLOOP(ARRAY)
#define BSXFUN_STDOP_DEFS_MXLOOP(ARRAY)
#define BSXFUN_OP2_DEF_MXLOOP(OP, ARRAY, ARRAY1, ARRAY2, LOOP)
#define BSXFUN_OP_DEF_MXLOOP(OP, ARRAY, LOOP)
OCTARRAY_OVERRIDABLE_FUNC_API const T * data(void) const
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API bool isempty(void) const
Size of the specified dimension.
bool test_all(F fcn) const
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type numel(void) const
Number of elements in the array.
OCTARRAY_OVERRIDABLE_FUNC_API const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
bool test_any(F fcn) const
Simpler calls.
OCTARRAY_API void resize(const dim_vector &dv, const double &rfv)
OCTARRAY_API Array< T, Alloc > & insert(const Array< T, Alloc > &a, const Array< octave_idx_type > &idx)
Insert an array into another at a specified position.
OCTARRAY_API double * fortran_vec(void)
OCTARRAY_OVERRIDABLE_FUNC_API double & elem(octave_idx_type n)
OCTARRAY_API Array< T, Alloc > diag(octave_idx_type k=0) const
Get the kth super or subdiagonal.
OCTARRAY_OVERRIDABLE_FUNC_API double & xelem(octave_idx_type n)
OCTAVE_API ComplexNDArray & insert(const NDArray &a, octave_idx_type r, octave_idx_type c)
Template for N-dimensional array classes with like-type math operators.
OCTAVE_API ComplexNDArray ifourier(int dim=1) const
OCTAVE_API NDArray diag(octave_idx_type k=0) const
static OCTAVE_API octave_idx_type compute_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions)
OCTAVE_API NDArray min(int dim=-1) const
OCTAVE_API bool all_elements_are_int_or_inf_or_nan(void) const
OCTAVE_API NDArray diff(octave_idx_type order=1, int dim=-1) const
OCTAVE_API bool all_elements_are_zero(void) const
OCTAVE_API NDArray abs(void) const
OCTAVE_API ComplexNDArray fourier2d(void) const
OCTAVE_API ComplexNDArray fourierNd(void) const
OCTAVE_API NDArray cumsum(int dim=-1) const
OCTAVE_API bool any_element_is_nan(void) const
OCTAVE_API bool any_element_not_one_or_zero(void) const
OCTAVE_API NDArray cummax(int dim=-1) const
OCTAVE_API ComplexNDArray ifourierNd(void) const
OCTAVE_API boolNDArray operator!(void) const
OCTAVE_API NDArray sumsq(int dim=-1) const
OCTAVE_API boolNDArray isnan(void) const
OCTAVE_API ComplexNDArray ifourier2d(void) const
OCTAVE_API NDArray max(int dim=-1) const
OCTAVE_API bool any_element_is_inf_or_nan(void) const
OCTAVE_API ComplexNDArray fourier(int dim=1) const
OCTAVE_API bool any_element_is_positive(bool=false) const
OCTAVE_API NDArray prod(int dim=-1) const
OCTAVE_API boolNDArray isfinite(void) const
OCTAVE_API bool too_large_for_float(void) const
static OCTAVE_API void increment_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions, int start_dimension=0)
OCTAVE_API NDArray cummin(int dim=-1) const
OCTAVE_API NDArray cumprod(int dim=-1) const
OCTAVE_API boolNDArray all(int dim=-1) const
OCTAVE_API bool all_integers(void) const
OCTAVE_API boolNDArray isinf(void) const
OCTAVE_API NDArray xsum(int dim=-1) const
OCTAVE_API NDArray & insert(const NDArray &a, octave_idx_type r, octave_idx_type c)
OCTAVE_API boolNDArray any(int dim=-1) const
OCTAVE_API bool any_element_is_negative(bool=false) const
OCTAVE_API NDArray concat(const NDArray &rb, const Array< octave_idx_type > &ra_idx)
friend class ComplexNDArray
OCTAVE_API NDArray sum(int dim=-1) const
OCTAVE_API charNDArray & insert(const charNDArray &a, octave_idx_type r, octave_idx_type c)
Vector representing the dimensions (size) of an Array.
octave_idx_type ndims(void) const
Number of dimensions.
std::istream & operator>>(std::istream &is, NDArray &a)
NDArray real(const ComplexNDArray &a)
NDArray imag(const ComplexNDArray &a)
std::ostream & operator<<(std::ostream &os, const NDArray &a)
NDArray max(double d, const NDArray &m)
void err_nan_to_logical_conversion(void)
double lo_ieee_nan_value(void)
octave_idx_type nint_big(double x)
bool negative_sign(double x)
bool positive_sign(double x)
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
bool is_int_or_inf_or_nan(double x)
bool too_large_for_float(double x)
bool is_one_or_zero(const T &x)
T mx_inline_xsum(const T *v, octave_idx_type n)
void mx_inline_any(const T *v, bool *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
void mx_inline_cummin(const T *v, T *r, octave_idx_type n)
void mx_inline_cumprod(const T *v, T *r, octave_idx_type n)
void mx_inline_cumsum(const T *v, T *r, octave_idx_type n)
bool mx_inline_any_nan(std::size_t n, const T *x)
void mx_inline_max(const T *v, T *r, octave_idx_type n)
void mx_inline_not(std::size_t n, bool *r, const X *x)
void mx_inline_all(const T *v, bool *r, octave_idx_type m, octave_idx_type n)
void mx_inline_prod(const T *v, T *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
void mx_inline_cummax(const T *v, T *r, octave_idx_type n)
void mx_inline_real(std::size_t n, T *r, const std::complex< T > *x)
T mx_inline_sumsq(const T *v, octave_idx_type n)
bool mx_inline_any_positive(std::size_t n, const T *x)
void mx_inline_imag(std::size_t n, T *r, const std::complex< T > *x)
T mx_inline_sum(const T *v, octave_idx_type n)
void mx_inline_min(const T *v, T *r, octave_idx_type n)
void mx_inline_diff(const T *v, T *r, octave_idx_type n, octave_idx_type order)
bool mx_inline_all_finite(std::size_t n, const T *x)
bool mx_inline_any_negative(std::size_t n, const T *x)
void mx_inline_pow(std::size_t n, R *r, const X *x, const Y *y)
#define NDND_BOOL_OPS(ND1, ND2)
#define NDS_BOOL_OPS(ND, S)
#define NDND_CMP_OPS(ND1, ND2)
#define SND_BOOL_OPS(S, ND)
#define NDS_CMP_OPS(ND, S)
#define SND_CMP_OPS(S, ND)
#define MINMAX_FCNS(T, S)
std::complex< double > Complex
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
const octave_base_value const Array< octave_idx_type > & ra_idx