24 #if defined (HAVE_CONFIG_H) 49 if (
rows () !=
a.rows () ||
cols () !=
a.cols ())
80 if (beg < 0 || end >=
length () || end < beg)
81 (*current_liboctave_error_handler) (
"range error for fill");
93 if (beg < 0 || end >=
length () || end < beg)
94 (*current_liboctave_error_handler) (
"range error for fill");
106 if (
a.numel () != len)
119 if (
a.numel () != len)
132 if (
a.numel () != len)
145 if (
a.numel () != len)
158 if (beg < 0 || beg + a_len >=
length ())
159 (*current_liboctave_error_handler) (
"range error for fill");
171 if (beg < 0 || beg + a_len >=
length ())
172 (*current_liboctave_error_handler) (
"range error for fill");
184 if (beg < 0 || beg + a_len >=
length ())
185 (*current_liboctave_error_handler) (
"range error for fill");
197 if (beg < 0 || beg + a_len >=
length ())
198 (*current_liboctave_error_handler) (
"range error for fill");
247 (*current_liboctave_error_handler) (
"invalid row selection");
250 if (r <=
c || (r >
c &&
i <
c))
260 (*current_liboctave_error_handler) (
"invalid row selection");
263 if (
c ==
'f' ||
c ==
'F')
264 return row (static_cast<octave_idx_type>(0));
265 else if (
c ==
'l' ||
c ==
'L')
277 (*current_liboctave_error_handler) (
"invalid column selection");
280 if (r >=
c || (r <
c &&
i < r))
290 (*current_liboctave_error_handler) (
"invalid column selection");
293 if (
c ==
'f' ||
c ==
'F')
294 return column (static_cast<octave_idx_type>(0));
295 else if (
c ==
'l' ||
c ==
'L')
314 (*current_liboctave_error_handler) (
"inverse requires square matrix");
345 if (
val < tol ||
val == 0.0)
374 if (r == 0 ||
c == 0)
401 c.dgxelem (
i) =
a.dgelem (
i) *
b.dgelem (
i);
429 double a_element =
a.elem (
i,
i);
432 c.elem (
i,
i) = a_element * b_element;
462 c.elem (
i,
i) = a_element * b_element;
475 (*current_liboctave_error_handler) (
"determinant requires square matrix");
488 double amx = av.
max ();
489 double amn = av.
min ();
490 return amx == 0 ? 0.0 : amn / amx;
505 os <<
' ' <<
a.elem (
i,
i);
octave_idx_type rows(void) const
void mx_inline_add2(size_t n, R *r, const X *x)
std::ostream & operator<<(std::ostream &os, const ComplexDiagMatrix &a)
identity matrix If supplied two scalar respectively For allows like xample val
ComplexDiagMatrix conj(const ComplexDiagMatrix &a)
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
ComplexColumnVector extract_diag(octave_idx_type k=0) const
const Complex * fortran_vec(void) const
octave_idx_type rows(void) const
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
Complex elem(octave_idx_type r, octave_idx_type c) const
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 const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
Template for two dimensional diagonal array with math operators.
ComplexDiagMatrix operator*(const ComplexDiagMatrix &a, const DiagMatrix &b)
octave_idx_type cols(void) const
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)
bool all_elements_are_real(void) const
ComplexDiagMatrix pseudo_inverse(double tol=0.0) const
octave_idx_type length(void) const
octave_idx_type cols(void) const
DiagMatrix abs(void) const
ComplexDiagMatrix & operator+=(const DiagMatrix &a)
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
bool operator==(const ComplexDiagMatrix &a) const
bool operator!=(const ComplexDiagMatrix &a) const
With real return the complex result
ComplexDiagMatrix inverse(void) const
Array< U > map(F fcn) const
Apply function fcn to each element of the Array<T>.
ComplexDiagMatrix & fill(double val)
ComplexMatrix extract(octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const
octave_idx_type columns(void) const
ComplexRowVector row(octave_idx_type i) const
ComplexColumnVector column(octave_idx_type i) const
std::complex< double > Complex
bool mx_inline_equal(size_t n, const T1 *x, const T2 *y)
ComplexDET determinant(void) const
const Complex * data(void) const