23 #if defined (HAVE_CONFIG_H)
52 return (hypot (a, b) < 1.0);
61 return a.real () < 0.0;
68 return (
abs (a) < 1.0);
79 (*current_liboctave_error_handler) (
"schur: requires square matrix");
100 char ord_char = ord.empty () ?
'U' : ord[0];
102 if (ord_char ==
'A' || ord_char ==
'D' || ord_char ==
'a' || ord_char ==
'd')
106 if (ord_char ==
'A' || ord_char ==
'a')
107 selector = select_ana<double>;
108 else if (ord_char ==
'D' || ord_char ==
'd')
109 selector = select_dig<double>;
122 unitary_mat.clear (n, n);
124 double *
s = schur_mat.fortran_vec ();
125 double *q = unitary_mat.fortran_vec ();
144 F77_XFCN (dgeesx, DGEESX, (F77_CONST_CHAR_ARG2 (&jobvs, 1),
145 F77_CONST_CHAR_ARG2 (&sort, 1),
147 F77_CONST_CHAR_ARG2 (&sense, 1),
148 n, s, n, sdim, pwr, pwi, q, n, rconde, rcondv,
149 pwork, lwork, piwork, liwork, pbwork, info
152 F77_CHAR_ARG_LEN (1)));
166 (*current_liboctave_error_handler) (
"SCHUR requires square matrix");
171 unitary_mat.clear ();
187 char ord_char = ord.empty () ?
'U' : ord[0];
189 if (ord_char ==
'A' || ord_char ==
'D' || ord_char ==
'a' || ord_char ==
'd')
193 if (ord_char ==
'A' || ord_char ==
'a')
194 selector = select_ana<float>;
195 else if (ord_char ==
'D' || ord_char ==
'd')
196 selector = select_dig<float>;
209 unitary_mat.clear (n, n);
211 float *
s = schur_mat.fortran_vec ();
212 float *q = unitary_mat.fortran_vec ();
231 F77_XFCN (sgeesx, SGEESX, (F77_CONST_CHAR_ARG2 (&jobvs, 1),
232 F77_CONST_CHAR_ARG2 (&sort, 1),
234 F77_CONST_CHAR_ARG2 (&sense, 1),
235 n, s, n, sdim, pwr, pwi, q, n, rconde, rcondv,
236 pwork, lwork, piwork, liwork, pbwork, info
239 F77_CHAR_ARG_LEN (1)));
253 (*current_liboctave_error_handler) (
"SCHUR requires square matrix");
258 unitary_mat.clear ();
274 char ord_char = ord.empty () ?
'U' : ord[0];
276 if (ord_char ==
'A' || ord_char ==
'D' || ord_char ==
'a' || ord_char ==
'd')
280 if (ord_char ==
'A' || ord_char ==
'a')
281 selector = select_ana<Complex>;
282 else if (ord_char ==
'D' || ord_char ==
'd')
283 selector = select_dig<Complex>;
294 unitary_mat.clear (n, n);
296 Complex *
s = schur_mat.fortran_vec ();
297 Complex *q = unitary_mat.fortran_vec ();
313 F77_XFCN (zgeesx, ZGEESX, (F77_CONST_CHAR_ARG2 (&jobvs, 1),
314 F77_CONST_CHAR_ARG2 (&sort, 1),
316 F77_CONST_CHAR_ARG2 (&sense, 1),
322 F77_CHAR_ARG_LEN (1)));
338 (
"rsf2csf: inconsistent matrix dimensions");
361 (*current_liboctave_error_handler) (
"SCHUR requires square matrix");
366 unitary_mat.clear ();
382 char ord_char = ord.empty () ?
'U' : ord[0];
384 if (ord_char ==
'A' || ord_char ==
'D' || ord_char ==
'a' || ord_char ==
'd')
388 if (ord_char ==
'A' || ord_char ==
'a')
389 selector = select_ana<FloatComplex>;
390 else if (ord_char ==
'D' || ord_char ==
'd')
391 selector = select_dig<FloatComplex>;
402 unitary_mat.clear (n, n);
421 F77_XFCN (cgeesx, CGEESX, (F77_CONST_CHAR_ARG2 (&jobvs, 1),
422 F77_CONST_CHAR_ARG2 (&sort, 1),
424 F77_CONST_CHAR_ARG2 (&sense, 1),
430 F77_CHAR_ARG_LEN (1)));
447 (
"rsf2csf: inconsistent matrix dimensions");
static octave_idx_type select_ana(const T &a, const T &)
octave_idx_type(* float_complex_selector)(const FloatComplex &)
Octave interface to the compression and uncompression libraries.
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
#define F77_DBLE_CMPLX_ARG(x)
octave_idx_type init(const T &a, const std::string &ord, bool calc_unitary)
subroutine zrsf2csf(n, t, u, c, s)
#define F77_XFCN(f, F, args)
subroutine crsf2csf(n, t, u, c, s)
octave_idx_type rows(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
std::complex< double > w(std::complex< double > z, double relerr=0)
static octave_idx_type select_dig(const T &a, const T &b)
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
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_idx_type(* float_selector)(const float &, const float &)
octave_idx_type(* complex_selector)(const Complex &)
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))<
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
std::complex< float > FloatComplex
std::complex< double > Complex
const T * fortran_vec(void) const
octave_idx_type cols(void) const
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
octave_idx_type(* double_selector)(const double &, const double &)
octave_idx_type columns(void) const