24 #if defined (HAVE_CONFIG_H) 50 xelem (
i) =
static_cast<unsigned char> (
a(
i));
53 #if defined (HAVE_FFTW) 60 if (dim >
dv.
ndims () || dim < 0)
66 for (
int i = 0;
i < dim;
i++)
70 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
81 n, howmany, stride, dist);
91 if (dim >
dv.
ndims () || dim < 0)
97 for (
int i = 0;
i < dim;
i++)
101 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
111 n, howmany, stride, dist);
195 if (dim >
dv.
ndims () || dim < 0)
208 for (
int i = 0;
i < dim;
i++)
212 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
242 if (dim >
dv.
ndims () || dim < 0)
255 for (
int i = 0;
i < dim;
i++)
259 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
278 static_cast<float> (npts);
294 for (
int i = 0;
i < rank;
i++)
304 howmany = (stride == 1 ? howmany
305 : (howmany > stride ? stride : howmany));
318 prow[l] =
retval((l +
k*npts)*stride + j*dist);
323 retval((l +
k*npts)*stride + j*dist) = prow[l];
342 for (
int i = 0;
i < rank;
i++)
352 howmany = (stride == 1 ? howmany
353 : (howmany > stride ? stride : howmany));
366 prow[l] =
retval((l +
k*npts)*stride + j*dist);
371 retval((l +
k*npts)*stride + j*dist) =
372 prow[l] / static_cast<float> (npts);
390 for (
int i = 0;
i < rank;
i++)
400 howmany = (stride == 1 ? howmany
401 : (howmany > stride ? stride : howmany));
414 prow[l] =
retval((l +
k*npts)*stride + j*dist);
419 retval((l +
k*npts)*stride + j*dist) = prow[l];
437 for (
int i = 0;
i < rank;
i++)
447 howmany = (stride == 1 ? howmany
448 : (howmany > stride ? stride : howmany));
461 prow[l] =
retval((l +
k*npts)*stride + j*dist);
466 retval((l +
k*npts)*stride + j*dist) =
467 prow[l] / static_cast<float> (npts);
584 return do_mx_red_op<bool, float> (*
this, dim,
mx_inline_all);
590 return do_mx_red_op<bool, float> (*
this, dim,
mx_inline_any);
620 return do_mx_red_op<float, float> (*
this, dim,
mx_inline_sum);
644 return do_mx_minmax_op<float> (*
this, idx_arg, dim,
mx_inline_max);
656 return do_mx_minmax_op<float> (*
this, idx_arg, dim,
mx_inline_min);
720 (*current_liboctave_error_handler)
721 (
"invalid conversion from NaN to character");
729 retval.elem (
i) =
static_cast<char>(ival);
770 return do_mx_unary_map<float, float, std::abs> (*this);
776 return do_mx_unary_map<bool, float, octave::math::isnan> (*this);
782 return do_mx_unary_map<bool, float, octave::math::isinf> (*this);
788 return do_mx_unary_map<bool, float, octave::math::isfinite> (*this);
843 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)
boolNDArray operator!(void) const
#define NDS_BOOL_OPS(ND, S)
#define NDS_CMP_OPS(ND, S)
Template for N-dimensional array classes with like-type math operators.
void mx_inline_cummax(const T *v, T *r, octave_idx_type n)
bool all_elements_are_int_or_inf_or_nan(void) const
const octave_base_value const Array< octave_idx_type > & ra_idx
#define SND_CMP_OPS(S, ND)
NDArray dsum(int dim=-1) const
FloatNDArray max(int dim=-1) const
#define BSXFUN_OP_DEF_MXLOOP(OP, ARRAY, LOOP)
identity matrix If supplied two scalar respectively For allows like xample val
void mx_inline_real(size_t n, T *r, const std::complex< T > *x)
bool any_element_is_positive(bool=false) const
bool mx_inline_all_finite(size_t n, const T *x)
boolNDArray isinf(void) const
const float * fortran_vec(void) const
#define MINMAX_FCNS(T, S)
boolNDArray isnan(void) const
FloatComplexNDArray ifourierNd(void) const
bool any_element_is_nan(void) const
FloatNDArray cummin(int dim=-1) const
std::istream & operator>>(std::istream &is, FloatNDArray &a)
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
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)
static int fftNd(const double *, Complex *, const int, const dim_vector &)
FloatComplexNDArray fourier(int dim=1) const
bool all_elements_are_zero(void) const
float & elem(octave_idx_type n)
FloatNDArray sumsq(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 positive_sign(double x)
void mx_inline_max(const T *v, T *r, octave_idx_type n)
subroutine cfftb(n, c, wsave)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
void err_nan_to_logical_conversion(void)
bool mx_inline_any(const T *v, octave_idx_type n)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
FloatNDArray prod(int dim=-1) const
void mx_inline_imag(size_t n, T *r, const std::complex< T > *x)
boolNDArray all(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.
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
FloatNDArray cumsum(int dim=-1) const
boolNDArray any(int dim=-1) const
subroutine cffti(n, wsave)
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)
#define NDND_CMP_OPS(ND1, ND2)
bool any_element_not_one_or_zero(void) const
static octave_idx_type compute_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions)
#define NDND_BOOL_OPS(ND1, ND2)
subst_template_param< std::complex, T, double >::type mx_inline_dprod(const T *v, octave_idx_type n)
FloatNDArray real(const FloatComplexNDArray &a)
FloatNDArray cumprod(int dim=-1) const
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 imag(const FloatComplexNDArray &a)
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)
FloatNDArray min(int dim=-1) const
the exceeded dimensions are set to if fewer subscripts than dimensions are the exceeding dimensions are merged into the final requested dimension For consider the following dims
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)
F77_RET_T F77_FUNC(xerbla, XERBLA)
#define BSXFUN_STDREL_DEFS_MXLOOP(ARRAY)
float & xelem(octave_idx_type n)
bool test_all(F fcn) const
T mx_inline_sum(const T *v, octave_idx_type n)
FloatComplexNDArray fourier2d(void) const
FloatNDArray sum(int dim=-1) const
FloatNDArray max(float d, const FloatNDArray &m)
void mx_inline_cumprod(const T *v, T *r, octave_idx_type n)
void octave_write_float(std::ostream &os, float d)
void mx_inline_cumsum(const T *v, T *r, octave_idx_type n)
bool all_integers(void) const
octave_idx_type nint_big(double x)
bool negative_sign(double x)
Array< T > diag(octave_idx_type k=0) const
Get the kth super or subdiagonal.
FloatNDArray diag(octave_idx_type k=0) const
FloatNDArray cummax(int dim=-1) const
static int ifftNd(const Complex *, Complex *, const int, const dim_vector &)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
#define BSXFUN_OP2_DEF_MXLOOP(OP, ARRAY, ARRAY1, ARRAY2, LOOP)
bool too_large_for_float(void) const
FloatNDArray & insert(const FloatNDArray &a, octave_idx_type r, octave_idx_type c)
FloatComplexNDArray ifourier2d(void) const
FloatNDArray abs(void) const
bool any_element_is_negative(bool=false) const
std::complex< float > FloatComplex
std::ostream & operator<<(std::ostream &os, const FloatNDArray &a)
NDArray dprod(int dim=-1) const
octave_idx_type ndims(void) const
Number of dimensions.
bool mx_inline_all(const T *v, octave_idx_type n)
#define BSXFUN_STDOP_DEFS_MXLOOP(ARRAY)
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)
octave_idx_type numel(void) const
Number of elements in the array.
write the output to stdout if nargout is
Vector representing the dimensions (size) of an Array.
FloatComplexNDArray fourierNd(void) const
FloatComplexNDArray ifourier(int dim=1) const
boolNDArray isfinite(void) const
T mx_inline_prod(const T *v, octave_idx_type n)
bool xis_one_or_zero(double x)
bool any_element_is_inf_or_nan(void) const
where the brackets indicate optional arguments and and character or cell array For character arrays the conversion is repeated for every row
FloatNDArray diff(octave_idx_type order=1, 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)