25 #if defined (HAVE_CONFIG_H)
82 if (beg < 0 || end >=
length () || end < beg)
83 (*current_liboctave_error_handler) (
"range error for fill");
95 if (beg < 0 || end >=
length () || end < beg)
96 (*current_liboctave_error_handler) (
"range error for fill");
108 if (a.
numel () != len)
121 if (a.
numel () != len)
134 if (a.
numel () != len)
147 if (a.
numel () != len)
160 if (beg < 0 || beg + a_len >=
length ())
161 (*current_liboctave_error_handler) (
"range error for fill");
174 if (beg < 0 || beg + a_len >=
length ())
175 (*current_liboctave_error_handler) (
"range error for fill");
187 if (beg < 0 || beg + a_len >=
length ())
188 (*current_liboctave_error_handler) (
"range error for fill");
201 if (beg < 0 || beg + a_len >=
length ())
202 (*current_liboctave_error_handler) (
"range error for fill");
252 (*current_liboctave_error_handler) (
"invalid row selection");
255 if (r <= c || (r > c && i < c))
256 retval.elem (i) =
elem (i, i);
265 (*current_liboctave_error_handler) (
"invalid row selection");
268 if (c ==
'f' || c ==
'F')
269 return row (static_cast<octave_idx_type>(0));
270 else if (c ==
'l' || c ==
'L')
282 (*current_liboctave_error_handler) (
"invalid column selection");
285 if (r >= c || (r < c && i < r))
286 retval.elem (i) =
elem (i, i);
295 (*current_liboctave_error_handler) (
"invalid column selection");
298 if (c ==
'f' || c ==
'F')
299 return column (static_cast<octave_idx_type>(0));
300 else if (c ==
'l' || c ==
'L')
319 (*current_liboctave_error_handler) (
"inverse requires square matrix");
332 retval.elem (
i,
i) = 1.0f /
elem (
i,
i);
350 if (val < tol || val == 0.0
f)
351 retval.
elem (
i,
i) = 0.0f;
376 if (r != a_nr || c != a_nc)
379 if (r == 0 || c == 0)
425 if (a_nr == 0 || a_nc == 0 || b_nc == 0)
434 float a_element = a.
elem (
i,
i);
437 c.
elem (
i,
i) = a_element * b_element;
455 if (a_nr == 0 || a_nc == 0 || b_nc == 0)
467 c.
elem (
i,
i) = a_element * b_element;
480 (*current_liboctave_error_handler) (
"determinant requires square matrix");
493 float amx = av.
max ();
494 float amn = av.
min ();
495 return amx == 0 ? 0.0f : amn / amx;
510 os <<
" " << a.
elem (
i,
i);
FloatComplexColumnVector column(octave_idx_type i) const
void mx_inline_add2(size_t n, R *r, const X *x)
FloatComplexDiagMatrix inverse(void) const
FloatComplexDiagMatrix(void)
const FloatComplex * fortran_vec(void) const
FloatComplex elem(octave_idx_type r, octave_idx_type c) const
FloatComplexRowVector row(octave_idx_type i) 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
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE const F77_DBLE * f
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
FloatComplexDiagMatrix & fill(float val)
octave_idx_type rows(void) const
const FloatComplex * data(void) const
T & elem(octave_idx_type n)
bool operator==(const FloatComplexDiagMatrix &a) const
octave_idx_type rows(void) const
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
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
bool mx_inline_all_real(size_t n, const std::complex< T > *x)
T dgelem(octave_idx_type i) const
bool all_elements_are_real(void) const
FloatComplexDiagMatrix pseudo_inverse(float tol=0.0f) const
bool operator!=(const FloatComplexDiagMatrix &a) const
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)
Template for two dimensional diagonal array with math operators.
T & dgxelem(octave_idx_type i)
FloatComplexDiagMatrix operator*(const FloatComplexDiagMatrix &a, const FloatDiagMatrix &b)
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
FloatComplexColumnVector extract_diag(octave_idx_type k=0) const
With real return the complex result
FloatComplexDiagMatrix & operator+=(const FloatDiagMatrix &a)
FloatComplexDET determinant(void) const
FloatComplexDiagMatrix conj(const FloatComplexDiagMatrix &a)
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
FloatDiagMatrix abs(void) const
std::complex< float > FloatComplex
std::ostream & operator<<(std::ostream &os, const FloatComplexDiagMatrix &a)
bool mx_inline_equal(size_t n, const T1 *x, const T2 *y)
octave_idx_type cols(void) const
FloatComplexMatrix extract(octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const
octave_idx_type length(void) const