Mercurial > hg > octave-nkf
changeset 3334:5187390bfde6
[project @ 1999-11-03 20:41:16 by jwe]
author | jwe |
---|---|
date | Wed, 03 Nov 1999 20:41:16 +0000 |
parents | 15cddaacbc2d |
children | f39b97e13cf2 |
files | liboctave/ChangeLog liboctave/CmplxSCHUR.cc liboctave/dbleSCHUR.cc |
diffstat | 3 files changed, 24 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,11 @@ +1999-11-03 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dbleSCHUR.cc (SCHUR::init): IWORK is always referenced by dgeesx. + Don't forget to pass length of third string argument to dgeesx. + + * CmplxSCHUR.cc (ComplexSCHUR::init): Don't forget to pass length + of third string argument to zgeesx. + 1999-11-02 John W. Eaton <jwe@bevo.che.wisc.edu> * DiagArray2.cc (DiagArray2<T>::operator () (int, int)):
--- a/liboctave/CmplxSCHUR.cc +++ b/liboctave/CmplxSCHUR.cc @@ -40,7 +40,7 @@ const int&, int&, Complex*, Complex*, const int&, double&, double&, Complex*, const int&, double*, int*, - int&, long, long); + int&, long, long, long); } static int @@ -68,6 +68,9 @@ return -1; } + // Workspace requirements may need to be fixed if any of the + // following change. + char jobvs = 'V'; char sense = 'N'; char sort = 'N'; @@ -106,18 +109,13 @@ Array<Complex> work (lwork); Complex *pwork = work.fortran_vec (); - // bwork is not referenced for non-ordered Schur. - - Array<int> bwork; - - if (ord_char == 'A' || ord_char == 'D' || ord_char == 'a' || ord_char == 'd') - bwork.resize (n); - + // BWORK is not referenced for non-ordered Schur. + Array<int> bwork ((ord_char == 'N' || ord_char == 'n') ? 0 : n); int *pbwork = bwork.fortran_vec (); F77_XFCN (zgeesx, ZGEESX, (&jobvs, &sort, selector, &sense, n, s, n, sdim, pw, q, n, rconde, rcondv, pwork, - lwork, prwork, pbwork, info, 1L, 1L)); + lwork, prwork, pbwork, info, 1L, 1L, 1L)); if (f77_exception_encountered) (*current_liboctave_error_handler) ("unrecoverable error in zgeesx");
--- a/liboctave/dbleSCHUR.cc +++ b/liboctave/dbleSCHUR.cc @@ -42,7 +42,7 @@ int&, double*, double*, double*, const int&, double&, double&, double*, const int&, int*, const int&, int*, - int&, long, long); + int&, long, long, long); } static int @@ -69,6 +69,9 @@ return -1; } + // Workspace requirements may need to be fixed if any of the + // following change. + char jobvs = 'V'; char sense = 'N'; char sort = 'N'; @@ -108,25 +111,17 @@ Array<double> work (lwork); double *pwork = work.fortran_vec (); - // These are not referenced for the non-ordered Schur routine. - - Array<int> bwork; - Array<int> iwork; + // BWORK is not referenced for the non-ordered Schur routine. + Array<int> bwork ((ord_char == 'N' || ord_char == 'n') ? 0 : n); + int *pbwork = bwork.fortran_vec (); - if (ord_char == 'A' || ord_char == 'D' || ord_char == 'a' || ord_char == 'd') - { - bwork.resize (n); - iwork.resize (liwork); - } - - int *pbwork = bwork.fortran_vec (); + Array<int> iwork (liwork); int *piwork = iwork.fortran_vec (); - F77_XFCN (dgeesx, DGEESX, (&jobvs, &sort, selector, &sense, n, s, n, sdim, pwr, pwi, q, n, rconde, rcondv, pwork, lwork, piwork, liwork, pbwork, - info, 1L, 1L)); + info, 1L, 1L, 1L)); if (f77_exception_encountered) (*current_liboctave_error_handler) ("unrecoverable error in dgeesx");