26 #if defined (HAVE_CONFIG_H)
66 if (beg < 0 || end >=
length () || end < beg)
67 (*current_liboctave_error_handler) (
"range error for fill");
80 (*current_liboctave_error_handler) (
"range error for fill");
93 (*current_liboctave_error_handler) (
"range error for fill");
105 if (beg < 0 || beg + a_len >=
length ())
106 (*current_liboctave_error_handler) (
"range error for fill");
118 if (beg < 0 || beg + a_len >=
length ())
119 (*current_liboctave_error_handler) (
"range error for fill");
149 if (r1 > r2) { std::swap (r1, r2); }
150 if (c1 > c2) { std::swap (c1, c2); }
155 Matrix result (new_r, new_c);
159 result.
elem (i, j) =
elem (r1+i, c1+j);
172 (*current_liboctave_error_handler) (
"invalid row selection");
185 (*current_liboctave_error_handler) (
"invalid row selection");
188 if (c ==
'f' || c ==
'F')
190 else if (c ==
'l' || c ==
'L')
202 (*current_liboctave_error_handler) (
"invalid column selection");
215 (*current_liboctave_error_handler) (
"invalid column selection");
218 if (c ==
'f' || c ==
'F')
220 else if (c ==
'l' || c ==
'L')
239 (*current_liboctave_error_handler) (
"inverse requires square matrix");
249 if (
xelem (i, i) == 0.0)
265 (*current_liboctave_error_handler)
266 (
"inverse of the null matrix not defined");
268 else if (z_count > 0)
290 if (val < tol || val == 0.0)
335 (*current_liboctave_error_handler) (
"determinant requires square matrix");
348 double amx = av.
max ();
349 double amn = av.
min ();
350 return amx == 0 ? 0.0 : amn / amx;
363 os <<
' ' << a.
elem (i, i);
Array< U > map(F fcn) const
Apply function fcn to each element of the Array<T>.
octave_idx_type numel(void) const
Number of elements in the array.
T & elem(octave_idx_type n)
Size of the specified dimension.
const T * fortran_vec(void) const
Size of the specified dimension.
ComplexColumnVector extract_diag(octave_idx_type k=0) const
T dgelem(octave_idx_type i) const
T elem(octave_idx_type r, octave_idx_type c) const
const T * data(void) const
T & dgxelem(octave_idx_type i)
T xelem(octave_idx_type r, octave_idx_type c) const
octave_idx_type length(void) const
octave_idx_type cols(void) const
octave_idx_type columns(void) const
octave_idx_type rows(void) const
DET determinant(void) const
RowVector row(octave_idx_type i) const
Matrix extract(octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const
DiagMatrix abs(void) const
DiagMatrix & fill(double val)
DiagMatrix pseudo_inverse(double tol=0.0) const
DiagMatrix inverse(void) const
ColumnVector extract_diag(octave_idx_type k=0) const
bool operator!=(const DiagMatrix &a) const
bool operator==(const DiagMatrix &a) const
ColumnVector column(octave_idx_type i) const
DiagMatrix real(const ComplexDiagMatrix &a)
DiagMatrix imag(const ComplexDiagMatrix &a)
std::ostream & operator<<(std::ostream &os, const DiagMatrix &a)
DiagMatrix operator*(const DiagMatrix &a, const DiagMatrix &b)
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
bool mx_inline_equal(size_t n, const T1 *x, const T2 *y)
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
octave_value::octave_value(const Array< char > &chm, char type) return retval