25 #if defined (HAVE_CONFIG_H)
65 if (beg < 0 || end >=
length () || end < beg)
66 (*current_liboctave_error_handler) (
"range error for fill");
78 if (a.
numel () != len)
91 if (a.
numel () != len)
104 if (beg < 0 || beg + a_len >=
length ())
105 (*current_liboctave_error_handler) (
"range error for fill");
117 if (beg < 0 || beg + a_len >=
length ())
118 (*current_liboctave_error_handler) (
"range error for fill");
171 (*current_liboctave_error_handler) (
"invalid row selection");
174 if (r <= c || (r > c && i < c))
175 retval.elem (i) =
elem (i, i);
184 (*current_liboctave_error_handler) (
"invalid row selection");
187 if (c ==
'f' || c ==
'F')
188 return row (static_cast<octave_idx_type>(0));
189 else if (c ==
'l' || c ==
'L')
201 (*current_liboctave_error_handler) (
"invalid column selection");
204 if (r >= c || (r < c && i < r))
205 retval.elem (i) =
elem (i, i);
214 (*current_liboctave_error_handler) (
"invalid column selection");
217 if (c ==
'f' || c ==
'F')
218 return column (static_cast<octave_idx_type>(0));
219 else if (c ==
'l' || c ==
'L')
239 (*current_liboctave_error_handler) (
"inverse requires square matrix");
249 retval.elem (
i,
i) = 1.0 /
elem (
i,
i);
267 if (val < tol || val == 0.0)
312 (*current_liboctave_error_handler) (
"determinant requires square matrix");
325 double amx = av.
max ();
326 double amn = av.
min ();
327 return amx == 0 ? 0.0 : amn / amx;
340 os <<
" " << a.
elem (
i,
i);
RowVector row(octave_idx_type i) const
double elem(octave_idx_type r, octave_idx_type c) const
octave_idx_type numel(void) const
Number of elements in the array.
identity matrix If supplied two scalar respectively For allows like xample val
ColumnVector column(octave_idx_type i) const
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
ComplexColumnVector extract_diag(octave_idx_type k=0) const
DiagMatrix & fill(double val)
octave_idx_type rows(void) const
DET determinant(void) const
const double * data(void) const
DiagMatrix pseudo_inverse(double tol=0.0) const
T & elem(octave_idx_type n)
DiagMatrix inverse(void) const
Matrix extract(octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const
ColumnVector extract_diag(octave_idx_type k=0) const
DiagMatrix operator*(const DiagMatrix &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
T dgelem(octave_idx_type i) const
DiagMatrix imag(const ComplexDiagMatrix &a)
Array< U > map(F fcn) const
Apply function fcn to each element of the Array.
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
DiagMatrix real(const ComplexDiagMatrix &a)
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
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))<
octave_idx_type columns(void) const
DiagMatrix abs(void) const
bool operator!=(const DiagMatrix &a) const
std::ostream & operator<<(std::ostream &os, const DiagMatrix &a)
bool mx_inline_equal(size_t n, const T1 *x, const T2 *y)
octave_idx_type length(void) const
bool operator==(const DiagMatrix &a) const