diff liboctave/CMatrix.cc @ 4330:9f86c2055b58

[project @ 2003-02-18 22:31:55 by jwe]
author jwe
date Tue, 18 Feb 2003 22:31:55 +0000
parents d53c33d93440
children a6c22c2c9b09
line wrap: on
line diff
--- a/liboctave/CMatrix.cc	Tue Feb 18 20:08:20 2003 +0000
+++ b/liboctave/CMatrix.cc	Tue Feb 18 22:31:55 2003 +0000
@@ -960,9 +960,9 @@
       Complex *tmp_data = retval.fortran_vec ();
 
       Array<Complex> z(1);
-      int lwork = 1;
-
-      // Query the optimum work array size
+      int lwork = -1;
+
+      // Query the optimum work array size.
 
       F77_XFCN (zgetri, ZGETRI, (nc, tmp_data, nr, pipvt, 
 				 z.fortran_vec (), lwork, info));
@@ -981,7 +981,7 @@
 
       info = 0;
 
-      /* Calculate the norm of the matrix, for later use */
+      // Calculate the norm of the matrix, for later use.
       double anorm;
       if (calc_cond)
 	anorm  = retval.abs().sum().row(0).max();
@@ -992,13 +992,13 @@
 	(*current_liboctave_error_handler) ("unrecoverable error in zgetrf");
       else
 	{
-	  /* Throw-away extra info LAPACK gives so as to not change output */
+	  // Throw-away extra info LAPACK gives so as to not change output.
 	  rcond = 0.;
 	  if ( info != 0) 
 	    info = -1;
 	  else if (calc_cond) 
 	    {
-	      /* Now calculate the condition number for non-singular matrix */
+	      // Now calculate the condition number for non-singular matrix.
 	      char job = '1';
 	      Array<double> rz (2 * nc);
 	      double *prz = rz.fortran_vec ();
@@ -1436,7 +1436,7 @@
 
       info = 0;
 
-      /* Calculate the norm of the matrix, for later use */
+      // Calculate the norm of the matrix, for later use.
       double anorm = 0;
       if (calc_cond) 
 	anorm = atmp.abs().sum().row(0).max();
@@ -1447,7 +1447,7 @@
 	(*current_liboctave_error_handler) ("unrecoverable error in zgetrf");
       else
 	{
-	  /* Throw-away extra info LAPACK gives so as to not change output */
+	  // Throw-away extra info LAPACK gives so as to not change output.
 	  rcond = 0.;
 	  if ( info != 0) 
 	    {
@@ -1458,7 +1458,7 @@
 	    {
 	      if (calc_cond) 
 		{
-		  /* Now calc the condition number for non-singular matrix */
+		  // Now calc the condition number for non-singular matrix.
 		  char job = '1';
 		  Array<Complex> z (2*nr);
 		  Complex *pz = z.fortran_vec ();
@@ -1583,7 +1583,7 @@
       Array<double> rz (2 * nc);
       double *prz = rz.fortran_vec ();
 
-      /* Calculate the norm of the matrix, for later use */
+      // Calculate the norm of the matrix, for later use.
       double anorm = atmp.abs().sum().row(0).max();
 
       F77_XFCN (zgetrf, ZGETRF, (nr, nr, tmp_data, nr, pipvt, info));
@@ -1592,7 +1592,7 @@
 	(*current_liboctave_error_handler) ("unrecoverable error in zgetrf");
       else
 	{
-	  /* Throw-away extra info LAPACK gives so as to not change output */
+	  // Throw-away extra info LAPACK gives so as to not change output.
 	  rcond = 0.;
 	  if ( info != 0) 
 	    { 
@@ -1607,7 +1607,7 @@
 	    } 
 	  else 
 	    {
-	      /* Now calculate the condition number for non-singular matrix */
+	      // Now calculate the condition number for non-singular matrix.
 	      char job = '1';
 	      F77_XFCN (zgecon, ZGECON, ( &job, nc, tmp_data, nr, anorm, 
 					  rcond, pz, prz, info));
@@ -1732,7 +1732,7 @@
       Array<double> rz (2 * nc);
       double *prz = rz.fortran_vec ();
 
-      /* Calculate the norm of the matrix, for later use */
+      // Calculate the norm of the matrix, for later use.
       double anorm = atmp.abs().sum().row(0).max();
 
       F77_XFCN (zgetrf, ZGETRF, (nr, nr, tmp_data, nr, pipvt, info));
@@ -1741,7 +1741,7 @@
 	(*current_liboctave_error_handler) ("unrecoverable error in zgetrf");
       else
 	{
-	  /* Throw-away extra info LAPACK gives so as to not change output */
+	  // Throw-away extra info LAPACK gives so as to not change output.
 	  rcond = 0.;
 	  if ( info != 0) 
 	    { 
@@ -1756,7 +1756,7 @@
 	    } 
 	  else 
 	    {
-	      /* Now calculate the condition number for non-singular matrix */
+	      // Now calculate the condition number for non-singular matrix.
 	      char job = '1';
 	      F77_XFCN (zgecon, ZGECON, ( &job, nc, tmp_data, nr, anorm, 
 					  rcond, pz, prz, info));