25 #if defined (HAVE_CONFIG_H)
81 if (beg < 0 || end >=
length () || end < beg)
82 (*current_liboctave_error_handler) (
"range error for fill");
94 if (beg < 0 || end >=
length () || end < beg)
95 (*current_liboctave_error_handler) (
"range error for fill");
107 if (a.
numel () != len)
120 if (a.
numel () != len)
133 if (a.
numel () != len)
146 if (a.
numel () != len)
159 if (beg < 0 || beg + a_len >=
length ())
160 (*current_liboctave_error_handler) (
"range error for fill");
172 if (beg < 0 || beg + a_len >=
length ())
173 (*current_liboctave_error_handler) (
"range error for fill");
185 if (beg < 0 || beg + a_len >=
length ())
186 (*current_liboctave_error_handler) (
"range error for fill");
198 if (beg < 0 || beg + a_len >=
length ())
199 (*current_liboctave_error_handler) (
"range error for fill");
248 (*current_liboctave_error_handler) (
"invalid row selection");
251 if (r <= c || (r > c && i < c))
252 retval.elem (i) =
elem (i, i);
261 (*current_liboctave_error_handler) (
"invalid row selection");
264 if (c ==
'f' || c ==
'F')
265 return row (static_cast<octave_idx_type>(0));
266 else if (c ==
'l' || c ==
'L')
278 (*current_liboctave_error_handler) (
"invalid column selection");
281 if (r >= c || (r < c && i < r))
282 retval.elem (i) =
elem (i, i);
291 (*current_liboctave_error_handler) (
"invalid column selection");
294 if (c ==
'f' || c ==
'F')
295 return column (static_cast<octave_idx_type>(0));
296 else if (c ==
'l' || c ==
'L')
315 (*current_liboctave_error_handler) (
"inverse requires square matrix");
328 retval.elem (
i,
i) = 1.0 /
elem (
i,
i);
346 if (val < tol || val == 0.0)
372 if (r != a_nr || c != a_nc)
375 if (r == 0 || c == 0)
421 if (a_nr == 0 || a_nc == 0 || b_nc == 0)
430 double a_element = a.
elem (
i,
i);
433 c.
elem (
i,
i) = a_element * b_element;
451 if (a_nr == 0 || a_nc == 0 || b_nc == 0)
463 c.
elem (
i,
i) = a_element * b_element;
476 (*current_liboctave_error_handler) (
"determinant requires square matrix");
489 double amx = av.
max ();
490 double amn = av.
min ();
491 return amx == 0 ? 0.0 : amn / amx;
506 os <<
" " << a.
elem (
i,
i);
void mx_inline_add2(size_t n, R *r, const X *x)
bool operator!=(const ComplexDiagMatrix &a) const
const Complex * fortran_vec(void) const
Complex elem(octave_idx_type r, octave_idx_type c) const
std::ostream & operator<<(std::ostream &os, const ComplexDiagMatrix &a)
octave_idx_type numel(void) const
Number of elements in the array.
identity matrix If supplied two scalar respectively For allows like xample val
ComplexDiagMatrix conj(const ComplexDiagMatrix &a)
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
ComplexColumnVector extract_diag(octave_idx_type k=0) const
ComplexDiagMatrix inverse(void) const
ComplexMatrix extract(octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const
octave_idx_type rows(void) const
const Complex * data(void) const
ComplexRowVector row(octave_idx_type i) const
T & elem(octave_idx_type n)
ComplexDiagMatrix pseudo_inverse(double tol=0.0) const
bool operator==(const ComplexDiagMatrix &a) const
octave_idx_type rows(void) const
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
ComplexDiagMatrix operator*(const ComplexDiagMatrix &a, const DiagMatrix &b)
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 mx_inline_all_real(size_t n, const std::complex< T > *x)
T dgelem(octave_idx_type i) const
Array< U > map(F fcn) const
Apply function fcn to each element of the Array.
ComplexDiagMatrix & operator+=(const DiagMatrix &a)
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
Template for two dimensional diagonal array with math operators.
T & dgxelem(octave_idx_type i)
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
With real return the complex result
ComplexDET determinant(void) const
octave_idx_type cols(void) const
=val(i)}if ode{val(i)}occurs in table i
OCTAVE_EXPORT octave_value_list return the value of the option it must match the dimension of the state and the relative tolerance must also be a vector of the same length tem it must match the dimension of the state and the absolute tolerance must also be a vector of the same length The local error test applied at each integration step is xample roup abs(local error in x(i))<
ComplexDiagMatrix & fill(double val)
octave_idx_type columns(void) const
std::complex< double > Complex
bool mx_inline_equal(size_t n, const T1 *x, const T2 *y)
octave_idx_type cols(void) const
bool all_elements_are_real(void) const
ComplexColumnVector column(octave_idx_type i) const
octave_idx_type length(void) const
DiagMatrix abs(void) const