26#if defined (HAVE_CONFIG_H)
69 if (nr == 0 || nc == 0 || nr != nc)
70 error (
"for A^b, A must be a square matrix. Use .^ for elementwise power.");
73 error (
"use full(a) ^ full(b)");
75 int btmp =
static_cast<int> (b);
100 atmp = a.
inverse (mattyp, info, rcond, 1);
103 warning (
"inverse: matrix singular to machine precision, rcond = %g", rcond);
115 result = result * atmp;
137 if (nr == 0 || nc == 0 || nr != nc)
138 error (
"for A^b, A must be a square matrix. Use .^ for elementwise power.");
141 error (
"use full(a) ^ full(b)");
143 int btmp =
static_cast<int> (b);
168 atmp = a.
inverse (mattyp, info, rcond, 1);
171 warning (
"inverse: matrix singular to machine precision, rcond = %g", rcond);
183 result = result * atmp;
232template <
typename S,
typename SM>
270 result(i, j) =
std::pow (atmp, b(i, j));
285 result(i, j) =
std::pow (a, b(i, j));
310 result(i, j) =
std::pow (atmp, b(i, j));
422 if (nr != b_nr || nc != b_nc)
425 int convert_to_complex = 0;
431 double btmp = b (a.
ridx (i), j);
434 convert_to_complex = 1;
447 if (convert_to_complex)
461 retval = complex_result;
524 if (nr != b_nr || nc != b_nc)
556 double btmp = b (i, j);
558 result (i, j) =
std::pow (a,
static_cast<int> (btmp));
579 result (i, j) =
std::pow (a, b (i, j));
604 result (a.
ridx (i), j)
664 if (nr != b_nr || nc != b_nc)
673 double btmp = b(a.
ridx (i), j);
677 static_cast<int> (btmp));
731 if (nr != b_nr || nc != b_nc)
charNDArray max(char d, const charNDArray &m)
charNDArray min(char d, const charNDArray &m)
OCTAVE_API SparseComplexMatrix inverse(void) const
OCTAVE_API bool all_integers(double &max_val, double &min_val) const
OCTAVE_API SparseMatrix inverse(void) const
OCTAVE_API bool any_element_is_negative(bool=false) const
octave_idx_type rows(void) const
octave_idx_type nnz(void) const
Actual number of nonzero terms.
dim_vector dims(void) const
octave_idx_type * ridx(void)
octave_idx_type * cidx(void)
Sparse< T, Alloc > maybe_compress(bool remove_zeros=false)
octave_idx_type cols(void) const
T & xelem(octave_idx_type n)
octave_idx_type numel(void) const
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
Matrix matrix_value(bool frc_str_conv=false) const
bool iscomplex(void) const
void warning(const char *fmt,...)
void error(const char *fmt,...)
F77_RET_T const F77_DBLE * x
class OCTAVE_API SparseMatrix
class OCTAVE_API SparseComplexMatrix
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
std::complex< double > Complex
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_value xpow(const SparseMatrix &a, double b)
octave_value elem_xpow(double a, const SparseMatrix &b)
octave_value scalar_xpow(const S &a, const SM &b)
static OCTAVE_NAMESPACE_BEGIN int xisint(double x)