26 #if defined (HAVE_CONFIG_H)
48 else if (
f.numel () == 1)
57 y.
xelem (i) = std::ldexp (
f.xelem (i * f_inc),
58 static_cast<int> (e.
xelem (i * e_inc)));
67 int ee =
static_cast<int> (e.
data (0));
69 y.
data (i) = std::ldexp (
f.data (i), ee);
71 else if (
f.numel () == e.
numel ())
77 while (i >=
f.cidx (col))
79 int ee =
static_cast<int> (e.
xelem (
f.ridx (i), col - 1));
80 y.
data (i) = std::ldexp (
f.data (i), ee);
115 if (args.length () < 1 || args.length () > 2)
118 if (! args(0).isfloat ())
122 if (args.length () == 1)
124 if (args(0).iscomplex ())
133 if (args(0).issparse ())
138 else if (args(0).is_single_type ())
155 if (args(0).issparse ())
167 if (! args(1).isfloat ())
170 if (args(0).iscomplex () || args(1).iscomplex ())
172 "pow2: imaginary part is ignored");
177 if (args(0).issparse ())
182 if ((
f.numel () == 1) && (
f.nnz () == 0))
197 if (args(0).is_single_type () || args(1).is_single_type ())
208 NDArray e = args(1).array_value ();
214 if (args(0).issparse ())
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.
OCTARRAY_OVERRIDABLE_FUNC_API T & xelem(octave_idx_type n)
Size of the specified dimension.
octave_idx_type nnz(void) const
Actual number of nonzero terms.
dim_vector dims(void) const
T & xelem(octave_idx_type n)
octave_idx_type numel(void) const
SparseComplexMatrix sparse_complex_matrix_value(bool frc_str_conv=false) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void warning_with_id(const char *id, const char *fmt,...)
void err_wrong_type_arg(const char *name, const char *s)
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
F77_RET_T const F77_DBLE * x
F77_RET_T const F77_DBLE const F77_DBLE * f
class OCTAVE_API SparseMatrix
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
OCTINTERP_API octave_value binary_op(type_info &ti, octave_value::binary_op op, const octave_value &a, const octave_value &b)
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
void map_2_xldexp(Array< T > &y, const Array< T > &f, const Array< T > &e)
void map_2_xldexp_sparse(SparseMatrix &y, const SparseMatrix &f, const SparseMatrix &e)