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); }
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')
240 (*current_liboctave_error_handler) (
"inverse requires square matrix");
247 if (
elem (i, i) == 0.0)
268 if (val < tol || val == 0.0f)
313 (*current_liboctave_error_handler) (
"determinant requires square matrix");
326 float amx = av.
max ();
327 float amn = av.
min ();
328 return amx == 0 ? 0.0f : amn / amx;
341 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.
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)
octave_idx_type length(void) const
octave_idx_type cols(void) const
octave_idx_type columns(void) const
octave_idx_type rows(void) const
FloatComplexColumnVector extract_diag(octave_idx_type k=0) const
bool operator==(const FloatDiagMatrix &a) const
FloatRowVector row(octave_idx_type i) const
FloatDiagMatrix inverse(void) const
FloatDiagMatrix(void)=default
bool operator!=(const FloatDiagMatrix &a) const
FloatDiagMatrix & fill(float val)
FloatColumnVector extract_diag(octave_idx_type k=0) const
FloatDiagMatrix abs(void) const
FloatDET determinant(void) const
FloatMatrix extract(octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const
FloatDiagMatrix pseudo_inverse(float tol=0.0f) const
FloatColumnVector column(octave_idx_type i) const
std::ostream & operator<<(std::ostream &os, const FloatDiagMatrix &a)
FloatDiagMatrix real(const FloatComplexDiagMatrix &a)
FloatDiagMatrix operator*(const FloatDiagMatrix &a, const FloatDiagMatrix &b)
FloatDiagMatrix imag(const FloatComplexDiagMatrix &a)
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