23 #if defined (HAVE_CONFIG_H) 52 return (hypot (
a,
b) < 1.0);
64 return (hypot (
a,
b) < 1.0);
73 return a.real () < 0.0;
80 return (
abs (
a) < 1.0);
87 return a.real () < 0.0;
94 return (
abs (
a) < 1.0);
105 (*current_liboctave_error_handler) (
"schur: requires square matrix");
110 unitary_mat.clear ();
126 char ord_char = (ord.empty () ?
'U' : ord[0]);
128 if (ord_char ==
'A' || ord_char ==
'D' || ord_char ==
'a' || ord_char ==
'd')
132 if (ord_char ==
'A' || ord_char ==
'a')
134 else if (ord_char ==
'D' || ord_char ==
'd')
148 unitary_mat.clear (n, n);
150 double *
s = schur_mat.fortran_vec ();
151 double *q = unitary_mat.fortran_vec ();
157 double *pwi =
wi.fortran_vec ();
163 F77_INT ntmp = (ord_char ==
'N' || ord_char ==
'n') ? 0 : n;
170 F77_XFCN (dgeesx, DGEESX, (F77_CONST_CHAR_ARG2 (&jobvs, 1),
171 F77_CONST_CHAR_ARG2 (&sort, 1),
173 F77_CONST_CHAR_ARG2 (&sense, 1),
174 n,
s, n, sdim, pwr, pwi, q, n, rconde, rcondv,
175 pwork, lwork, piwork, liwork, pbwork, info
178 F77_CHAR_ARG_LEN (1)));
192 (*current_liboctave_error_handler) (
"SCHUR requires square matrix");
197 unitary_mat.clear ();
213 char ord_char = (ord.empty () ?
'U' : ord[0]);
215 if (ord_char ==
'A' || ord_char ==
'D' || ord_char ==
'a' || ord_char ==
'd')
219 if (ord_char ==
'A' || ord_char ==
'a')
221 else if (ord_char ==
'D' || ord_char ==
'd')
235 unitary_mat.clear (n, n);
237 float *
s = schur_mat.fortran_vec ();
238 float *q = unitary_mat.fortran_vec ();
244 float *pwi =
wi.fortran_vec ();
250 F77_INT ntmp = (ord_char ==
'N' || ord_char ==
'n') ? 0 : n;
257 F77_XFCN (sgeesx, SGEESX, (F77_CONST_CHAR_ARG2 (&jobvs, 1),
258 F77_CONST_CHAR_ARG2 (&sort, 1),
260 F77_CONST_CHAR_ARG2 (&sense, 1),
261 n,
s, n, sdim, pwr, pwi, q, n, rconde, rcondv,
262 pwork, lwork, piwork, liwork, pbwork, info
265 F77_CHAR_ARG_LEN (1)));
279 (*current_liboctave_error_handler) (
"SCHUR requires square matrix");
284 unitary_mat.clear ();
300 char ord_char = (ord.empty () ?
'U' : ord[0]);
302 if (ord_char ==
'A' || ord_char ==
'D' || ord_char ==
'a' || ord_char ==
'd')
306 if (ord_char ==
'A' || ord_char ==
'a')
308 else if (ord_char ==
'D' || ord_char ==
'd')
320 unitary_mat.clear (n, n);
322 Complex *
s = schur_mat.fortran_vec ();
323 Complex *q = unitary_mat.fortran_vec ();
335 F77_INT ntmp = (ord_char ==
'N' || ord_char ==
'n') ? 0 : n;
339 F77_XFCN (zgeesx, ZGEESX, (F77_CONST_CHAR_ARG2 (&jobvs, 1),
340 F77_CONST_CHAR_ARG2 (&sort, 1),
342 F77_CONST_CHAR_ARG2 (&sense, 1),
348 F77_CHAR_ARG_LEN (1)));
362 if (
s.columns () != n ||
u.rows () != n ||
u.columns () != n)
364 (
"rsf2csf: inconsistent matrix dimensions");
387 (*current_liboctave_error_handler) (
"SCHUR requires square matrix");
392 unitary_mat.clear ();
408 char ord_char = (ord.empty () ?
'U' : ord[0]);
410 if (ord_char ==
'A' || ord_char ==
'D' || ord_char ==
'a' || ord_char ==
'd')
414 if (ord_char ==
'A' || ord_char ==
'a')
416 else if (ord_char ==
'D' || ord_char ==
'd')
428 unitary_mat.clear (n, n);
443 F77_INT ntmp = (ord_char ==
'N' || ord_char ==
'n') ? 0 : n;
447 F77_XFCN (cgeesx, CGEESX, (F77_CONST_CHAR_ARG2 (&jobvs, 1),
448 F77_CONST_CHAR_ARG2 (&sort, 1),
450 F77_CONST_CHAR_ARG2 (&sense, 1),
456 F77_CHAR_ARG_LEN (1)));
471 if (
s.columns () != n ||
u.rows () != n ||
u.columns () != n)
473 (
"rsf2csf: inconsistent matrix dimensions");
double _Complex F77_DBLE_CMPLX
F77_INT(* double_selector)(const F77_DBLE &, const F77_DBLE &)
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
#define F77_DBLE_CMPLX_ARG(x)
const T * fortran_vec(void) const
static F77_INT select_ana(const double &a, const double &)
static F77_INT select_dig(const double &a, const double &b)
subroutine zrsf2csf(n, t, u, c, s)
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
#define F77_XFCN(f, F, args)
subroutine crsf2csf(n, t, u, c, s)
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
std::complex< double > w(std::complex< double > z, double relerr=0)
F77_INT(* float_selector)(const F77_REAL &, const F77_REAL &)
schur< FloatComplexMatrix > rsf2csf< FloatComplexMatrix, FloatMatrix >(const FloatMatrix &s_arg, const FloatMatrix &u_arg)
schur< ComplexMatrix > rsf2csf< ComplexMatrix, Matrix >(const Matrix &s_arg, const Matrix &u_arg)
octave_f77_int_type F77_INT
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
F77_INT(* float_complex_selector)(const F77_CMPLX &)
std::complex< float > FloatComplex
F77_INT(* complex_selector)(const F77_DBLE_CMPLX &)
octave_f77_int_type init(const T &a, const std::string &ord, bool calc_unitary)
std::complex< double > Complex
Vector representing the dimensions (size) of an Array.
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string