65 if (beg < 0 || end >=
length () || end < beg)
67 (*current_liboctave_error_handler) (
"range error for fill");
83 (*current_liboctave_error_handler) (
"range error for fill");
99 (*current_liboctave_error_handler) (
"range error for fill");
113 if (beg < 0 || beg + a_len >=
length ())
115 (*current_liboctave_error_handler) (
"range error for fill");
129 if (beg < 0 || beg + a_len >=
length ())
131 (*current_liboctave_error_handler) (
"range error for fill");
163 if (r1 > r2) { std::swap (r1, r2); }
164 if (c1 > c2) { std::swap (c1, c2); }
169 Matrix result (new_r, new_c);
173 result.
elem (i, j) =
elem (r1+i, c1+j);
187 (*current_liboctave_error_handler) (
"invalid row selection");
192 if (r <= c || (r > c && i < c))
203 (*current_liboctave_error_handler) (
"invalid row selection");
208 if (c ==
'f' || c ==
'F')
209 return row (static_cast<octave_idx_type>(0));
210 else if (c ==
'l' || c ==
'L')
214 (*current_liboctave_error_handler) (
"invalid row selection");
226 (*current_liboctave_error_handler) (
"invalid column selection");
231 if (r >= c || (r < c && i < r))
242 (*current_liboctave_error_handler) (
"invalid column selection");
247 if (c ==
'f' || c ==
'F')
248 return column (static_cast<octave_idx_type>(0));
249 else if (c ==
'l' || c ==
'L')
253 (*current_liboctave_error_handler) (
"invalid column selection");
273 (*current_liboctave_error_handler) (
"inverse requires square matrix");
282 if (
elem (i, i) == 0.0)
288 retval.
elem (i, i) = 1.0 /
elem (i, i);
305 if (
elem (i, i) != 0.0)
306 retval.
elem (i, i) = 1.0 /
elem (i, i);
308 retval.
elem (i, i) = 0.0;
350 (*current_liboctave_error_handler) (
"determinant requires square matrix");
367 double amx = av.
max (), amn = av.
min ();
368 return amx == 0 ? 0.0 : amn / amx;
381 os <<
" " << a.
elem (i, i);