26 #if defined (HAVE_CONFIG_H)
67 if (nr == 0 || nc == 0 || nr != nc)
68 error (
"for A^b, A must be a square matrix. Use .^ for elementwise power.");
71 error (
"use full(a) ^ full(b)");
73 int btmp =
static_cast<int> (b);
98 atmp = a.
inverse (mattyp, info, rcond, 1);
101 warning (
"inverse: matrix singular to machine precision, rcond = %g", rcond);
113 result = result * atmp;
135 if (nr == 0 || nc == 0 || nr != nc)
136 error (
"for A^b, A must be a square matrix. Use .^ for elementwise power.");
139 error (
"use full(a) ^ full(b)");
141 int btmp =
static_cast<int> (b);
166 atmp = a.
inverse (mattyp, info, rcond, 1);
169 warning (
"inverse: matrix singular to machine precision, rcond = %g", rcond);
181 result = result * atmp;
230 template <
typename S,
typename SM>
268 result(i, j) =
std::pow (atmp, b(i,j));
283 result(i, j) =
std::pow (a, b(i,j));
308 result(i, j) =
std::pow (atmp, b(i,j));
420 if (nr != b_nr || nc != b_nc)
423 int convert_to_complex = 0;
429 double btmp = b (a.
ridx (i), j);
432 convert_to_complex = 1;
445 if (convert_to_complex)
522 if (nr != b_nr || nc != b_nc)
554 double btmp = b (i, j);
556 result (i, j) =
std::pow (a,
static_cast<int> (btmp));
577 result (i, j) =
std::pow (a, b (i, j));
602 result (a.
ridx (i), j)
662 if (nr != b_nr || nc != b_nc)
671 double btmp = b(a.
ridx (i), j);
675 static_cast<int> (btmp));
729 if (nr != b_nr || nc != b_nc)
charNDArray max(char d, const charNDArray &m)
charNDArray min(char d, const charNDArray &m)
SparseComplexMatrix inverse(void) const
bool all_integers(double &max_val, double &min_val) const
SparseMatrix inverse(void) const
bool any_element_is_negative(bool=false) const
octave_idx_type numel(void) const
octave_idx_type cols(void) const
T & xelem(octave_idx_type n)
octave_idx_type * cidx(void)
octave_idx_type nnz(void) const
Actual number of nonzero terms.
octave_idx_type rows(void) const
dim_vector dims(void) const
Sparse< T > maybe_compress(bool remove_zeros=false)
octave_idx_type * ridx(void)
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
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::octave_value(const Array< char > &chm, char type) return retval
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 int xisint(double x)