24 #if defined (HAVE_CONFIG_H)
65 if (nr == 0 || nc == 0 || nr != nc)
66 error (
"for A^b, A must be a square matrix. Use .^ for elementwise power.");
68 if (static_cast<int> (b) != b)
69 error (
"use full(a) ^ full(b)");
71 int btmp =
static_cast<int> (
b);
96 atmp = a.
inverse (mattyp, info, rcond, 1);
99 warning (
"inverse: matrix singular to machine precision, rcond = %g", rcond);
111 result = result * atmp;
133 if (nr == 0 || nc == 0 || nr != nc)
134 error (
"for A^b, A must be a square matrix. Use .^ for elementwise power.");
136 if (static_cast<int> (b) != b)
137 error (
"use full(a) ^ full(b)");
139 int btmp =
static_cast<int> (
b);
164 atmp = a.
inverse (mattyp, info, rcond, 1);
167 warning (
"inverse: matrix singular to machine precision, rcond = %g", rcond);
179 result = result * atmp;
228 template <
typename S,
typename SM>
418 if (nr != b_nr || nc != b_nc)
421 int convert_to_complex = 0;
427 double btmp =
b (a.
ridx (
i), j);
428 if (static_cast<int> (btmp) != btmp)
430 convert_to_complex = 1;
443 if (convert_to_complex)
457 retval = complex_result;
520 if (nr != b_nr || nc != b_nc)
552 double btmp =
b (
i, j);
660 if (nr != b_nr || nc != b_nc)
669 double btmp =
b(a.
ridx (
i), j);
673 static_cast<int> (btmp));
727 if (nr != b_nr || nc != b_nc)
octave_idx_type cols(void) const
octave_value xpow(const SparseMatrix &a, double b)
octave_value scalar_xpow(const S &a, const SM &b)
octave_idx_type rows(void) const
octave_idx_type numel(void) const
static int xisint(double x)
dim_vector dims(void) const
identity matrix If supplied two scalar respectively For allows like xample val
T & xelem(octave_idx_type n)
SparseComplexMatrix inverse(void) const
SparseMatrix inverse(void) const
void error(const char *fmt,...)
octave_idx_type * cidx(void)
octave_idx_type nnz(void) const
Actual number of nonzero terms.
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 all_integers(double &max_val, double &min_val) const
Sparse< T > maybe_compress(bool remove_zeros=false)
bool any_element_is_negative(bool=false) const
octave_value elem_xpow(double a, const SparseMatrix &b)
bool is_complex_type(void) const
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
Matrix matrix_value(bool frc_str_conv=false) const
With real return the complex result
void warning(const char *fmt,...)
charNDArray max(char d, const charNDArray &m)
octave_idx_type * ridx(void)
=val(i)}if ode{val(i)}occurs in table i
ComplexMatrix complex_matrix_value(bool frc_str_conv=false) const
std::complex< double > Complex
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 * x
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
charNDArray min(char d, const charNDArray &m)