diff liboctave/dbleSCHUR.cc @ 5008:c2bb27ada496

[project @ 2004-09-17 14:45:39 by jwe]
author jwe
date Fri, 17 Sep 2004 14:45:39 +0000
parents 6f3382e08a52
children e35b034d3523
line wrap: on
line diff
--- a/liboctave/dbleSCHUR.cc	Fri Sep 17 11:42:04 2004 +0000
+++ b/liboctave/dbleSCHUR.cc	Fri Sep 17 14:45:39 2004 +0000
@@ -63,7 +63,7 @@
 }
 
 int
-SCHUR::init (const Matrix& a, const std::string& ord)
+SCHUR::init (const Matrix& a, const std::string& ord, bool calc_unitary)
 {
   int a_nr = a.rows ();
   int a_nc = a.cols ();
@@ -77,10 +77,15 @@
   // Workspace requirements may need to be fixed if any of the
   // following change.
 
-  char jobvs = 'V';
+  char jobvs;
   char sense = 'N';
   char sort = 'N';
 
+  if (calc_unitary)
+    jobvs = 'V';
+  else
+    jobvs = 'N';
+
   char ord_char = ord.empty () ? 'U' : ord[0];
 
   if (ord_char == 'A' || ord_char == 'D' || ord_char == 'a' || ord_char == 'd')
@@ -102,7 +107,9 @@
   double rcondv;
 
   schur_mat = a;
-  unitary_mat.resize (n, n);
+
+  if (calc_unitary)
+    unitary_mat.resize (n, n);
 
   double *s = schur_mat.fortran_vec ();
   double *q = unitary_mat.fortran_vec ();