24 #if defined (HAVE_CONFIG_H) 49 if (
rows () !=
a.rows () ||
cols () !=
a.cols ())
81 if (beg < 0 || end >=
length () || end < beg)
82 (*current_liboctave_error_handler) (
"range error for fill");
94 if (beg < 0 || end >=
length () || end < beg)
95 (*current_liboctave_error_handler) (
"range error for fill");
107 if (
a.numel () != len)
120 if (
a.numel () != len)
133 if (
a.numel () != len)
146 if (
a.numel () != len)
159 if (beg < 0 || beg + a_len >=
length ())
160 (*current_liboctave_error_handler) (
"range error for fill");
173 if (beg < 0 || beg + a_len >=
length ())
174 (*current_liboctave_error_handler) (
"range error for fill");
186 if (beg < 0 || beg + a_len >=
length ())
187 (*current_liboctave_error_handler) (
"range error for fill");
200 if (beg < 0 || beg + a_len >=
length ())
201 (*current_liboctave_error_handler) (
"range error for fill");
251 (*current_liboctave_error_handler) (
"invalid row selection");
254 if (r <=
c || (r >
c &&
i <
c))
264 (*current_liboctave_error_handler) (
"invalid row selection");
267 if (
c ==
'f' ||
c ==
'F')
268 return row (static_cast<octave_idx_type>(0));
269 else if (
c ==
'l' ||
c ==
'L')
281 (*current_liboctave_error_handler) (
"invalid column selection");
284 if (r >=
c || (r <
c &&
i < r))
294 (*current_liboctave_error_handler) (
"invalid column selection");
297 if (
c ==
'f' ||
c ==
'F')
298 return column (static_cast<octave_idx_type>(0));
299 else if (
c ==
'l' ||
c ==
'L')
318 (*current_liboctave_error_handler) (
"inverse requires square matrix");
378 if (r == 0 ||
c == 0)
405 c.dgxelem (
i) =
a.dgelem (
i) *
b.dgelem (
i);
407 c.dgxelem (
i) = 0.0f;
433 float a_element =
a.elem (
i,
i);
436 c.elem (
i,
i) = a_element * b_element;
466 c.elem (
i,
i) = a_element * b_element;
479 (*current_liboctave_error_handler) (
"determinant requires square matrix");
492 float amx = av.
max ();
493 float amn = av.
min ();
494 return amx == 0 ? 0.0f : amn / amx;
509 os <<
' ' <<
a.elem (
i,
i);
octave_idx_type rows(void) const
void mx_inline_add2(size_t n, R *r, const X *x)
FloatComplexDiagMatrix(void)
bool operator==(const FloatComplexDiagMatrix &a) const
FloatComplexMatrix extract(octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const
bool all_elements_are_real(void) const
identity matrix If supplied two scalar respectively For allows like xample val
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 * f
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
const FloatComplex * fortran_vec(void) const
FloatComplexDiagMatrix & fill(float val)
FloatDiagMatrix abs(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
FloatComplex 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.
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)
FloatComplexColumnVector extract_diag(octave_idx_type k=0) const
octave_idx_type length(void) const
octave_idx_type cols(void) const
bool operator!=(const FloatComplexDiagMatrix &a) const
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
FloatComplexDiagMatrix pseudo_inverse(float tol=0.0f) const
FloatComplexDiagMatrix operator*(const FloatComplexDiagMatrix &a, const FloatDiagMatrix &b)
With real return the complex result
FloatComplexDiagMatrix & operator+=(const FloatDiagMatrix &a)
FloatComplexDiagMatrix conj(const FloatComplexDiagMatrix &a)
FloatComplexRowVector row(octave_idx_type i) const
FloatComplexDET determinant(void) const
Array< U > map(F fcn) const
Apply function fcn to each element of the Array<T>.
FloatComplexDiagMatrix inverse(void) const
FloatComplexColumnVector column(octave_idx_type i) const
octave_idx_type columns(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)
const FloatComplex * data(void) const