82 if (beg < 0 || end >=
length () || end < beg)
84 (*current_liboctave_error_handler) (
"range error for fill");
98 if (beg < 0 || end >=
length () || end < beg)
100 (*current_liboctave_error_handler) (
"range error for fill");
116 (*current_liboctave_error_handler) (
"range error for fill");
132 (*current_liboctave_error_handler) (
"range error for fill");
148 (*current_liboctave_error_handler) (
"range error for fill");
164 (*current_liboctave_error_handler) (
"range error for fill");
178 if (beg < 0 || beg + a_len >=
length ())
180 (*current_liboctave_error_handler) (
"range error for fill");
195 if (beg < 0 || beg + a_len >=
length ())
197 (*current_liboctave_error_handler) (
"range error for fill");
211 if (beg < 0 || beg + a_len >=
length ())
213 (*current_liboctave_error_handler) (
"range error for fill");
228 if (beg < 0 || beg + a_len >=
length ())
230 (*current_liboctave_error_handler) (
"range error for fill");
259 if (r1 > r2) { std::swap (r1, r2); }
260 if (c1 > c2) { std::swap (c1, c2); }
269 result.
elem (i, j) =
elem (r1+i, c1+j);
283 (*current_liboctave_error_handler) (
"invalid row selection");
288 if (r <= c || (r > c && i < c))
299 (*current_liboctave_error_handler) (
"invalid row selection");
304 if (c ==
'f' || c ==
'F')
305 return row (static_cast<octave_idx_type>(0));
306 else if (c ==
'l' || c ==
'L')
310 (*current_liboctave_error_handler) (
"invalid row selection");
322 (*current_liboctave_error_handler) (
"invalid column selection");
327 if (r >= c || (r < c && i < r))
338 (*current_liboctave_error_handler) (
"invalid column selection");
343 if (c ==
'f' || c ==
'F')
344 return column (static_cast<octave_idx_type>(0));
345 else if (c ==
'l' || c ==
'L')
349 (*current_liboctave_error_handler) (
"invalid column selection");
368 (*current_liboctave_error_handler) (
"inverse requires square matrix");
377 if (
elem (i, i) ==
static_cast<float> (0.0))
383 retval.
elem (i, i) =
static_cast<float> (1.0) /
elem (i, i);
400 if (
elem (i, i) != 0.0
f)
401 retval.
elem (i, i) = 1.0f /
elem (i, i);
403 retval.
elem (i, i) = 0.0f;
426 if (r != a_nr || c != a_nc)
432 if (r == 0 || c == 0)
480 if (a_nr == 0 || a_nc == 0 || b_nc == 0)
489 float a_element = a.
elem (i, i);
492 c.
elem (i, i) = a_element * b_element;
513 if (a_nr == 0 || a_nc == 0 || b_nc == 0)
525 c.
elem (i, i) = a_element * b_element;
539 (*current_liboctave_error_handler) (
"determinant requires square matrix");
556 float amx = av.
max (), amn = av.
min ();
557 return amx == 0 ? 0.0f : amn / amx;
572 os <<
" " << a.
elem (i, i);