24 #if defined (HAVE_CONFIG_H) 41 if (
rows () !=
a.rows () ||
cols () !=
a.cols ())
64 if (beg < 0 || end >=
length () || end < beg)
65 (*current_liboctave_error_handler) (
"range error for fill");
77 if (
a.numel () != len)
90 if (
a.numel () != len)
103 if (beg < 0 || beg + a_len >=
length ())
104 (*current_liboctave_error_handler) (
"range error for fill");
116 if (beg < 0 || beg + a_len >=
length ())
117 (*current_liboctave_error_handler) (
"range error for fill");
170 (*current_liboctave_error_handler) (
"invalid row selection");
173 if (r <=
c || (r >
c &&
i <
c))
183 (*current_liboctave_error_handler) (
"invalid row selection");
186 if (
c ==
'f' ||
c ==
'F')
187 return row (static_cast<octave_idx_type>(0));
188 else if (
c ==
'l' ||
c ==
'L')
200 (*current_liboctave_error_handler) (
"invalid column selection");
203 if (r >=
c || (r <
c &&
i < r))
213 (*current_liboctave_error_handler) (
"invalid column selection");
216 if (
c ==
'f' ||
c ==
'F')
217 return column (static_cast<octave_idx_type>(0));
218 else if (
c ==
'l' ||
c ==
'L')
238 (*current_liboctave_error_handler) (
"inverse requires square matrix");
266 if (
val < tol ||
val == 0.0)
297 c.dgxelem (
i) =
a.dgelem (
i) *
b.dgelem (
i);
311 (*current_liboctave_error_handler) (
"determinant requires square matrix");
324 double amx = av.
max ();
325 double amn = av.
min ();
326 return amx == 0 ? 0.0 : amn / amx;
339 os <<
' ' <<
a.elem (
i,
i);
ColumnVector extract_diag(octave_idx_type k=0) const
identity matrix If supplied two scalar respectively For allows like xample val
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
DiagMatrix inverse(void) const
DiagMatrix & fill(double val)
bool operator==(const DiagMatrix &a) const
bool operator!=(const DiagMatrix &a) 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
double elem(octave_idx_type r, octave_idx_type c) const
DET determinant(void) 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
DiagMatrix imag(const ComplexDiagMatrix &a)
octave_idx_type length(void) const
octave_idx_type cols(void) const
DiagMatrix abs(void) const
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
DiagMatrix real(const ComplexDiagMatrix &a)
With real return the complex result
Array< U > map(F fcn) const
Apply function fcn to each element of the Array<T>.
Matrix extract(octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const
octave_idx_type columns(void) const
ColumnVector column(octave_idx_type i) const
std::ostream & operator<<(std::ostream &os, const DiagMatrix &a)
bool mx_inline_equal(size_t n, const T1 *x, const T2 *y)
DiagMatrix pseudo_inverse(double tol=0.0) const
const double * data(void) const
RowVector row(octave_idx_type i) const