25 #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>
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.
ndims () || 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.
ndims () || dim < 0)
141 for (
int i = 0;
i < dim;
i++)
145 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
155 n, howmany, stride, dist);
203 int rank = dv.
ndims ();
218 int rank = dv.
ndims ();
223 Complex *out (retval.fortran_vec ());
239 if (dim > dv.
ndims () || dim < 0)
246 Complex *pwsave = wsave.fortran_vec ();
252 for (
int i = 0;
i < dim;
i++)
256 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
287 if (dim > dv.
ndims () || dim < 0)
294 Complex *pwsave = wsave.fortran_vec ();
300 for (
int i = 0;
i < dim;
i++)
304 howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
324 static_cast<double> (npts);
340 for (
int i = 0;
i < rank;
i++)
345 Complex *pwsave = wsave.fortran_vec ();
350 howmany = (stride == 1 ? howmany :
351 (howmany > stride ? stride : howmany));
364 prow[l] =
retval((l +
k*npts)*stride + j*dist);
370 retval((l +
k*npts)*stride + j*dist) = prow[l];
389 for (
int i = 0;
i < rank;
i++)
394 Complex *pwsave = wsave.fortran_vec ();
399 howmany = (stride == 1 ? howmany :
400 (howmany > stride ? stride : howmany));
413 prow[l] =
retval((l +
k*npts)*stride + j*dist);
419 retval((l +
k*npts)*stride + j*dist) =
420 prow[l] / static_cast<double> (npts);
434 int rank = dv.
ndims ();
438 for (
int i = 0;
i < rank;
i++)
443 Complex *pwsave = wsave.fortran_vec ();
448 howmany = (stride == 1 ? howmany :
449 (howmany > stride ? stride : howmany));
462 prow[l] =
retval((l +
k*npts)*stride + j*dist);
468 retval((l +
k*npts)*stride + j*dist) = prow[l];
482 int rank = dv.
ndims ();
486 for (
int i = 0;
i < rank;
i++)
491 Complex *pwsave = wsave.fortran_vec ();
496 howmany = (stride == 1 ? howmany :
497 (howmany > stride ? stride : howmany));
510 prow[l] =
retval((l +
k*npts)*stride + j*dist);
516 retval((l +
k*npts)*stride + j*dist) =
517 prow[l] / static_cast<double> (npts);
634 return do_mx_red_op<bool, double> (*
this, dim,
mx_inline_all);
640 return do_mx_red_op<bool, double> (*
this, dim,
mx_inline_any);
664 return do_mx_red_op<double, double> (*
this, dim,
mx_inline_sum);
688 return do_mx_minmax_op<double> (*
this, idx_arg, dim,
mx_inline_max);
700 return do_mx_minmax_op<double> (*
this, idx_arg, dim,
mx_inline_min);
746 retval.
insert (rb, ra_idx);
761 (*current_liboctave_error_handler)
762 (
"invalid conversion from NaN to character");
770 retval.
elem (
i) =
static_cast<char>(ival);
776 retval.
insert (rb, ra_idx);
809 return do_mx_unary_map<double, double, std::abs> (*this);
815 return do_mx_unary_map<bool, double, octave::math::isnan> (*this);
821 return do_mx_unary_map<bool, double, octave::math::isinf> (*this);
827 return do_mx_unary_map<bool, double, octave::math::finite> (*this);
882 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)
bool is_empty(void) const
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
identity matrix If supplied two scalar respectively For allows like xample val
NDArray max(double d, const NDArray &m)
#define F77_DBLE_CMPLX_ARG(x)
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
Array< T > diag(octave_idx_type k=0) const
Get the kth super or subdiagonal.
double & elem(octave_idx_type n)
double lo_ieee_nan_value(void)
Template for N-dimensional array classes with like-type math operators.
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)
bool positive_sign(double 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)
void err_nan_to_logical_conversion(void)
bool mx_inline_any(const T *v, octave_idx_type n)
NDArray imag(const ComplexNDArray &a)
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &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 F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
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.
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
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
nd deftypefn *octave_map m
NDArray & insert(const NDArray &a, octave_idx_type r, octave_idx_type c)
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)
F77_RET_T F77_FUNC(xstopx, XSTOPX) const
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)
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
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)
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
void mx_inline_cumsum(const T *v, T *r, octave_idx_type n)
boolNDArray isfinite(void) const
=val(i)}if ode{val(i)}occurs in table i
octave_idx_type nint_big(double x)
bool negative_sign(double x)
ComplexNDArray fourier(int dim=1) const
bool all_integers(void) const
issues an error eealso double
octave_idx_type ndims(void) const
Number of dimensions.
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
void mx_inline_not(size_t n, bool *r, const X *x)
write the output to stdout if nargout is
Vector representing the dimensions (size) of an Array.
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
where the brackets indicate optional arguments and and character or cell array For character arrays the conversion is repeated for every row
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)