26 #if defined (HAVE_CONFIG_H)
48 :
MArray<float> (a.dims ())
52 xelem (i) =
static_cast<unsigned char> (a(i));
55 #if defined (HAVE_FFTW)
62 if (dim > dv.
ndims () || dim < 0)
68 for (
int i = 0; i < dim; i++)
72 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
76 const float *in (
data ());
82 octave::fftw::fft (in + k * stride *
n, out + k * stride *
n,
83 n, howmany, stride, dist);
93 if (dim > dv.
ndims () || dim < 0)
99 for (
int i = 0; i < dim; i++)
103 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
112 octave::fftw::ifft (out + k * stride *
n, out + k * stride *
n,
113 n, howmany, stride, dist);
126 const float *in =
data ();
133 octave::fftw::fftNd (in + i*dist, out + i*dist, 2, dv2);
152 octave::fftw::ifftNd (out + i*dist, out + i*dist, 2, dv2);
161 int rank = dv.
ndims ();
163 const float *in (
data ());
167 octave::fftw::fftNd (in, out, rank, dv);
176 int rank = dv.
ndims ();
183 octave::fftw::ifftNd (in, out, rank, dv);
193 octave_unused_parameter (dim);
195 (*current_liboctave_error_handler)
196 (
"support for FFTW was unavailable or disabled when liboctave was built");
204 octave_unused_parameter (dim);
206 (*current_liboctave_error_handler)
207 (
"support for FFTW was unavailable or disabled when liboctave was built");
214 (*current_liboctave_error_handler)
215 (
"support for FFTW was unavailable or disabled when liboctave was built");
223 (*current_liboctave_error_handler)
224 (
"support for FFTW was unavailable or disabled when liboctave was built");
232 (*current_liboctave_error_handler)
233 (
"support for FFTW was unavailable or disabled when liboctave was built");
241 (*current_liboctave_error_handler)
242 (
"support for FFTW was unavailable or disabled when liboctave was built");
322 float val =
elem (i);
354 return do_mx_red_op<bool, float> (*
this, dim,
mx_inline_all);
360 return do_mx_red_op<bool, float> (*
this, dim,
mx_inline_any);
390 return do_mx_red_op<float, float> (*
this, dim,
mx_inline_sum);
414 return do_mx_minmax_op<float> (*
this, idx_arg, dim,
mx_inline_max);
426 return do_mx_minmax_op<float> (*
this, idx_arg, dim,
mx_inline_min);
490 (*current_liboctave_error_handler)
491 (
"invalid conversion from NaN to character");
499 retval.
elem (i) =
static_cast<char> (ival);
540 return do_mx_unary_map<float, float, std::abs> (*
this);
546 return do_mx_unary_map<bool, float, octave::math::isnan> (*
this);
552 return do_mx_unary_map<bool, float, octave::math::isinf> (*
this);
558 return do_mx_unary_map<bool, float, octave::math::isfinite> (*
this);
597 octave::write_value<float> (os, a.
elem (i));
613 tmp = octave::read_value<float> (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)
T & elem(octave_idx_type n)
Size of the specified dimension.
T * fortran_vec()
Size of the specified dimension.
bool test_all(F fcn) const
Size of the specified dimension.
Array< T, Alloc > & insert(const Array< T, Alloc > &a, const Array< octave_idx_type > &idx)
Insert an array into another at a specified position.
const T * data() const
Size of the specified dimension.
bool isempty() const
Size of the specified dimension.
const dim_vector & dims() const
Return a const-reference so that dims ()(i) works efficiently.
T & xelem(octave_idx_type n)
Size of the specified dimension.
Array< T, Alloc > diag(octave_idx_type k=0) const
Get the kth super or subdiagonal.
octave_idx_type numel() const
Number of elements in the array.
FloatComplexNDArray & insert(const NDArray &a, octave_idx_type r, octave_idx_type c)
bool any_element_is_positive(bool=false) const
boolNDArray isfinite() const
static octave_idx_type compute_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions)
FloatNDArray sum(int dim=-1) const
FloatNDArray min(int dim=-1) const
FloatComplexNDArray ifourier(int dim=1) const
FloatNDArray prod(int dim=-1) const
bool any_element_not_one_or_zero() const
bool any_element_is_negative(bool=false) const
FloatNDArray cumprod(int dim=-1) const
boolNDArray any(int dim=-1) const
boolNDArray isnan() const
boolNDArray all(int dim=-1) const
bool too_large_for_float() const
NDArray dprod(int dim=-1) const
FloatNDArray & insert(const FloatNDArray &a, octave_idx_type r, octave_idx_type c)
bool any_element_is_nan() const
bool all_integers() const
bool any_element_is_inf_or_nan() const
FloatNDArray cummin(int dim=-1) const
bool all_elements_are_zero() const
boolNDArray isinf() const
FloatNDArray cumsum(int dim=-1) const
FloatComplexNDArray ifourier2d() const
NDArray dsum(int dim=-1) const
FloatNDArray concat(const FloatNDArray &rb, const Array< octave_idx_type > &ra_idx)
FloatComplexNDArray fourier2d() const
FloatComplexNDArray fourierNd() const
static void increment_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions, int start_dimension=0)
FloatNDArray diff(octave_idx_type order=1, int dim=-1) const
FloatComplexNDArray ifourierNd() const
FloatComplexNDArray fourier(int dim=1) const
boolNDArray operator!() const
FloatNDArray cummax(int dim=-1) const
FloatNDArray sumsq(int dim=-1) const
FloatNDArray max(int dim=-1) const
bool all_elements_are_int_or_inf_or_nan() const
FloatNDArray diag(octave_idx_type k=0) const
friend class FloatComplexNDArray
Template for N-dimensional array classes with like-type math operators.
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() const
Number of dimensions.
std::istream & operator>>(std::istream &is, FloatNDArray &a)
FloatNDArray max(float d, const FloatNDArray &m)
FloatNDArray imag(const FloatComplexNDArray &a)
FloatNDArray real(const FloatComplexNDArray &a)
std::ostream & operator<<(std::ostream &os, const FloatNDArray &a)
void err_nan_to_logical_conversion()
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 is_one_or_zero(const T &x)
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_dprod(const T *v, typename subst_template_param< std::complex, T, double >::type *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
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_dsum(const T *v, typename subst_template_param< std::complex, T, double >::type *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
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< float > FloatComplex
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