Mercurial > hg > octave-shane
changeset 1360:7eb93d12654c
[project @ 1995-09-05 21:51:54 by jwe]
line wrap: on
line diff
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -33,9 +33,7 @@ #include "Array.h" -/* - * The real representation of all arrays. - */ +// The real representation of all arrays. template <class T> ArrayRep<T>::ArrayRep (T *d, int l) @@ -96,10 +94,8 @@ return data[n]; } -/* - * One dimensional array class. Handles the reference counting for - * all the derived classes. - */ +// One dimensional array class. Handles the reference counting for +// all the derived classes. template <class T> Array<T>::Array (T *d, int l) @@ -331,9 +327,7 @@ return rep->data; } -/* - * Two dimensional array class. - */ +// Two dimensional array class. template <class T> Array2<T>::Array2 (T *d, int n, int m) : Array<T> (d, n*m) @@ -588,9 +582,7 @@ delete old_rep; } -/* - * Three dimensional array class. - */ +// Three dimensional array class. template <class T> Array3<T>::Array3 (T *d, int n, int m, int k) : Array2<T> (d, n, m*k) @@ -726,19 +718,17 @@ void Array3<T>::resize (int n, int m, int k) { - assert (0); /* XXX FIXME XXX */ + assert (0); // XXX FIXME XXX } template <class T> void Array3<T>::resize (int n, int m, int k, const T& val) { - assert (0); /* XXX FIXME XXX */ + assert (0); // XXX FIXME XXX } -/* - * A two-dimensional array with diagonal elements only. - */ +// A two-dimensional array with diagonal elements only. template <class T> DiagArray<T>::DiagArray (T *d, int r, int c) : Array<T> (d, r < c ? r : c)
--- a/liboctave/CColVector.cc +++ b/liboctave/CColVector.cc @@ -49,9 +49,7 @@ long); } -/* - * Complex Column Vector class - */ +// Complex Column Vector class ComplexColumnVector::ComplexColumnVector (const ColumnVector& a) : MArray<Complex> (a.length ())
--- a/liboctave/CDiagMatrix.cc +++ b/liboctave/CDiagMatrix.cc @@ -37,9 +37,7 @@ #include "mx-inlines.cc" #include "lo-error.h" -/* - * Complex Diagonal Matrix class - */ +// Complex Diagonal Matrix class ComplexDiagMatrix::ComplexDiagMatrix (const RowVector& a) : MDiagArray<Complex> (a.length ())
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -67,10 +67,10 @@ const int&, double*, double&, int&, Complex*, const int&, double*, int&); -// Note that the original complex fft routines were not written for -// double complex arguments. They have been modified by adding an -// implicit double precision (a-h,o-z) statement at the beginning of -// each subroutine. + // Note that the original complex fft routines were not written for + // double complex arguments. They have been modified by adding an + // implicit double precision (a-h,o-z) statement at the beginning of + // each subroutine. int F77_FCN (cffti, CFFTI) (const int&, Complex*); @@ -79,9 +79,7 @@ int F77_FCN (cfftb, CFFTB) (const int&, Complex*, Complex*); } -/* - * Complex Matrix class - */ +// Complex Matrix class ComplexMatrix::ComplexMatrix (const Matrix& a) : MArray2<Complex> (a.rows (), a.cols ())
--- a/liboctave/CRowVector.cc +++ b/liboctave/CRowVector.cc @@ -49,9 +49,7 @@ long); } -/* - * Complex Row Vector class - */ +// Complex Row Vector class ComplexRowVector::ComplexRowVector (const RowVector& a) : MArray<Complex> (a.length ()) @@ -438,7 +436,7 @@ if (len == 0 || a.cols () == 0) return ComplexRowVector (0); -// Transpose A to form A'*x == (x'*A)' + // Transpose A to form A'*x == (x'*A)' int a_nr = a.rows (); int a_nc = a.cols ();
--- a/liboctave/CmplxAEPBAL.cc +++ b/liboctave/CmplxAEPBAL.cc @@ -51,14 +51,14 @@ int n = a.cols (); -// Parameters for balance call. + // Parameters for balance call. int info; int ilo; int ihi; double *scale = new double [n]; -// Copy matrix into local structure. + // Copy matrix into local structure. balanced_mat = a; @@ -66,7 +66,7 @@ balanced_mat.fortran_vec (), n, ilo, ihi, scale, info, 1L, 1L); -// Initialize balancing matrix to identity. + // Initialize balancing matrix to identity. balancing_mat = Matrix (n, n, 0.0); for (int i = 0; i < n; i++)
--- a/liboctave/CmplxCHOL.cc +++ b/liboctave/CmplxCHOL.cc @@ -61,8 +61,8 @@ chol_mat = ComplexMatrix (h, n, n); -// If someone thinks of a more graceful way of doing this (or faster for -// that matter :-)), please let me know! + // If someone thinks of a more graceful way of doing this (or faster + // for that matter :-)), please let me know! if (n > 1) for (int j = 0; j < a_nc; j++)
--- a/liboctave/CmplxHESS.cc +++ b/liboctave/CmplxHESS.cc @@ -100,8 +100,8 @@ hess_mat = ComplexMatrix (h, n, n); unitary_hess_mat = ComplexMatrix (z, n, n); -// If someone thinks of a more graceful way of doing this (or faster for -// that matter :-)), please let me know! + // If someone thinks of a more graceful way of doing this (or faster + // for that matter :-)), please let me know! if (n > 2) for (int j = 0; j < a_nc; j++)
--- a/liboctave/CmplxQRP.cc +++ b/liboctave/CmplxQRP.cc @@ -83,8 +83,8 @@ double *rwork = new double[2*n]; int *jpvt = new int[n]; -// Clear Pivot vector (code to enforce a certain permutation would go -// here...) + // Clear Pivot vector (code to enforce a certain permutation would + // go here...) for (int i = 0; i < n; i++) jpvt[i] = 0; @@ -92,8 +92,8 @@ F77_FCN (zgeqpf, ZGEQPF) (m, n, tmp_data, m, jpvt, tau, work, rwork, info); -// Form Permutation matrix (if economy is requested, return the -// indices only!) + // Form Permutation matrix (if economy is requested, return the + // indices only!) if (qr_type == QR::economy && m > n) {
--- a/liboctave/CmplxSCHUR.cc +++ b/liboctave/CmplxSCHUR.cc @@ -87,7 +87,7 @@ double *rwork = new double [n]; -// bwork is not referenced for non-ordered Schur. + // bwork is not referenced for non-ordered Schur. int *bwork = 0; if (*ord == 'A' || *ord == 'D' || *ord == 'a' || *ord == 'd')
--- a/liboctave/CollocWt.cc +++ b/liboctave/CollocWt.cc @@ -249,7 +249,7 @@ void CollocWt::init (void) { -// Check for possible errors. + // Check for possible errors. double wid = rb - lb; if (wid <= 0.0) @@ -279,14 +279,14 @@ double *pr = r.fortran_vec (); -// Compute roots. + // Compute roots. F77_FCN (jcobi, JCOBI) (nt, n, inc_left, inc_right, Alpha, Beta, dif1, dif2, dif3, pr); int id; -// First derivative weights. + // First derivative weights. id = 1; for (int i = 1; i <= nt; i++) @@ -298,7 +298,7 @@ A (i-1, j) = vect[j]; } -// Second derivative weights. + // Second derivative weights. id = 2; for (int i = 1; i <= nt; i++) @@ -310,7 +310,7 @@ B (i-1, j) = vect[j]; } -// Gaussian quadrature weights. + // Gaussian quadrature weights. id = 3; double *pq = q.fortran_vec ();
--- a/liboctave/DASSL.cc +++ b/liboctave/DASSL.cc @@ -232,7 +232,7 @@ Vector tmp_state (nn); Vector tmp_deriv (nn); -// XXX FIXME XXX + // XXX FIXME XXX Matrix tmp_dfdxdot (nn, nn); Matrix tmp_dfdx (nn, nn); @@ -319,13 +319,16 @@ // intermediate-output mode. The code has not yet reached // TOUT. break; + case 2: // The integration to TSTOP was successfully completed // (T=TSTOP) by stepping exactly to TSTOP. break; + case 3: // The integration to TOUT was successfully completed // (T=TOUT) by stepping past TOUT. Y(*) is obtained by // interpolation. YPRIME(*) is obtained by interpolation. break; + case -1: // A large amount of work has been expended. (About 500 steps). case -2: // The error tolerances are too stringent. case -3: // The local error test cannot be satisfied because you @@ -348,6 +351,7 @@ // recover. A message is printed explaining the trouble // and control is returned to the calling program. For // example, this occurs when invalid input is detected. + default: integration_error = 1; break;
--- a/liboctave/FSQP.cc +++ b/liboctave/FSQP.cc @@ -34,7 +34,7 @@ #include "FSQP.h" #include "f77-uscore.h" -#endif /* FSQP_MISSING */ +#endif /* ;;; Local Variables: ***
--- a/liboctave/LPsolve.cc +++ b/liboctave/LPsolve.cc @@ -41,7 +41,7 @@ void LPsolve::set_default_options (void) { -// Maybe this isn't needed? + // Maybe this isn't needed? } /*
--- a/liboctave/LSODE.cc +++ b/liboctave/LSODE.cc @@ -160,11 +160,10 @@ { ColumnVector tmp_deriv (neq); - /* - * NOTE: this won't work if LSODE passes copies of the state vector. - * In that case we have to create a temporary vector object - * and copy. - */ + // NOTE: this won't work if LSODE passes copies of the state vector. + // In that case we have to create a temporary vector object + // and copy. + tmp_deriv = (*user_fun) (*tmp_x, time); if (tmp_deriv.length () == 0) @@ -184,11 +183,10 @@ { Matrix tmp_jac (neq, neq); - /* - * NOTE: this won't work if LSODE passes copies of the state vector. - * In that case we have to create a temporary vector object - * and copy. - */ + // NOTE: this won't work if LSODE passes copies of the state vector. + // In that case we have to create a temporary vector object + // and copy. + tmp_jac = (*user_jac) (*tmp_x, time); for (int j = 0; j < neq; j++) @@ -210,15 +208,15 @@ double *xp = x.fortran_vec (); -// NOTE: this won't work if LSODE passes copies of the state vector. -// In that case we have to create a temporary vector object -// and copy. + // NOTE: this won't work if LSODE passes copies of the state vector. + // In that case we have to create a temporary vector object + // and copy. tmp_x = &x; user_fun = fun; user_jac = jac; -// Try 5000 steps before giving up. + // Try 5000 steps before giving up. iwork[5] = 5000; int working_too_hard = 0; @@ -255,17 +253,18 @@ switch (istate) { case -13: // Return requested in user-supplied function. - case -6: // error weight became zero during problem. (solution - // component i vanished, and atol or atol(i) = 0.) - case -5: // repeated convergence failures (perhaps bad jacobian - // supplied or wrong choice of mf or tolerances). - case -4: // repeated error test failures (check all inputs). - case -3: // illegal input detected (see printed message). - case -2: // excess accuracy requested (tolerances too small). + case -6: // error weight became zero during problem. (solution + // component i vanished, and atol or atol(i) = 0.) + case -5: // repeated convergence failures (perhaps bad jacobian + // supplied or wrong choice of mf or tolerances). + case -4: // repeated error test failures (check all inputs). + case -3: // illegal input detected (see printed message). + case -2: // excess accuracy requested (tolerances too small). integration_error = 1; return ColumnVector (); break; - case -1: // excess work done on this call (perhaps wrong mf). + + case -1: // excess work done on this call (perhaps wrong mf). working_too_hard++; if (working_too_hard > 20) { @@ -281,8 +280,10 @@ goto again; } break; - case 2: // lsode was successful + + case 2: // lsode was successful break; + default: // Error? break;
--- a/liboctave/LinConst.cc +++ b/liboctave/LinConst.cc @@ -45,7 +45,7 @@ LinConst::LinConst (const Matrix& a_eq, const Vector& b_eq, const Matrix& a_ineq, const Vector& b_ineq) { -// Need some checks here. + // Need some checks here. int nc_eq = b_eq.capacity (); int nc_ineq = b_ineq.capacity ();
--- a/liboctave/MArray.cc +++ b/liboctave/MArray.cc @@ -99,9 +99,7 @@ } \ while (0) -/* - * One dimensional array with math ops. - */ +// One dimensional array with math ops. // Element by element MArray by scalar ops. @@ -222,9 +220,7 @@ return MArray<T> (result, l); } -/* - * Two dimensional array with math ops. - */ +// Two dimensional array with math ops. template <class T> MArray2<T>::MArray2 (const MDiagArray<T>& a) @@ -367,9 +363,7 @@ return MArray2<T> (result, a.rows (), a.cols ()); } -/* - * Two dimensional diagonal array with math ops. - */ +// Two dimensional diagonal array with math ops. // Element by element MDiagArray by MDiagArray ops.
--- a/liboctave/NPSOL.cc +++ b/liboctave/NPSOL.cc @@ -186,7 +186,7 @@ Vector NPSOL::minimize (double& objf, int& inform, Vector& lambda) { -// Dimensions of various things. + // Dimensions of various things. int n = x.capacity (); int nclin = lc.size (); @@ -195,15 +195,15 @@ int nrowj = 1 > ncnln ? 1 : ncnln; int nrowr = n; -// Informative stuff. + // Informative stuff. int iter; int *istate = new int [n+nclin+ncnln]; -// User defined function stuff is defined above in the functions -// npsol_confun() and npsol_objfun(); + // User defined function stuff is defined above in the functions + // npsol_confun() and npsol_objfun(); -// Constraint stuff. + // Constraint stuff. double dummy; double *pclin = &dummy; @@ -255,22 +255,22 @@ cjac = new double [nrowj*n]; } -// Objective stuff. + // Objective stuff. double *objgrd = new double [n]; -// Other stuff. + // Other stuff. double *r = new double [n*n]; lambda.resize (n+nclin+ncnln); double *pclambda = lambda.fortran_vec (); -// Decision variable stuff. + // Decision variable stuff. double *px = x.fortran_vec (); -// Workspace parameters. + // Workspace parameters. int lenw; int leniw = 3 * n + nclin + 2 * ncnln; @@ -316,7 +316,7 @@ break; } -// Clean up. + // Clean up. delete [] istate; delete [] clow; @@ -328,7 +328,7 @@ delete [] iw; delete [] w; -// See how it went. + // See how it went. return x; } @@ -449,10 +449,8 @@ init (); } -/* - * Passing invalid values to the set_* functions will result in - * setting the default option. - */ +// Passing invalid values to the set_* functions will result in +// setting the default option. void NPSOL_options::set_central_difference_interval (double val) @@ -769,7 +767,7 @@ delete [] command; } -#endif /* NPSOL_MISSING */ +#endif /* ;;; Local Variables: ***
--- a/liboctave/QPSOL.cc +++ b/liboctave/QPSOL.cc @@ -266,7 +266,7 @@ return x_print_level; } -#endif /* QPSOL_MISSING */ +#endif /* ;;; Local Variables: ***
--- a/liboctave/Quad.cc +++ b/liboctave/Quad.cc @@ -236,12 +236,15 @@ case bound_to_inf: inf = 1; break; + case neg_inf_to_bound: inf = -1; break; + case doubly_infinite: inf = 2; break; + default: assert (0); break;
--- a/liboctave/Range.cc +++ b/liboctave/Range.cc @@ -135,9 +135,6 @@ return is; } -int -Range::nelem_internal (void) const -{ // Find an approximate number of intervals, then do the best we can to // find the number of intervals that we would get if we had done // something like @@ -151,7 +148,10 @@ // The number of elements in the range is one greater than the number // of intervals. -// We can't have more than INT_MAX elements in the range. +int +Range::nelem_internal (void) const +{ + // We can't have more than INT_MAX elements in the range. double d_n_intervals = (rng_limit - rng_base) / rng_inc; int max_intervals = INT_MAX - 1; @@ -166,13 +166,13 @@ if (rng_limit > rng_base && rng_inc > 0) { -// Our approximation may have been too big. + // Our approximation may have been too big. while (rng_base + n_intervals * rng_inc > rng_limit && n_intervals > 0) n_intervals--; -// Now that we are close, get the actual number. Try to avoid -// problems with extended precision registers. + // Now that we are close, get the actual number. Try to avoid + // problems with extended precision registers. for (;;) { @@ -186,13 +186,13 @@ } else if (rng_limit < rng_base && rng_inc < 0) { -// Our approximation may have been too big. + // Our approximation may have been too big. while (rng_base + n_intervals * rng_inc < rng_limit && n_intervals > 0) n_intervals--; -// Now that we are close, get the actual number. Try to avoid -// problems with extended precision registers. + // Now that we are close, get the actual number. Try to avoid + // problems with extended precision registers. for (;;) {
--- a/liboctave/dColVector.cc +++ b/liboctave/dColVector.cc @@ -49,9 +49,7 @@ long); } -/* - * Column Vector class. - */ +// Column Vector class. int ColumnVector::operator == (const ColumnVector& a) const
--- a/liboctave/dDiagMatrix.cc +++ b/liboctave/dDiagMatrix.cc @@ -37,9 +37,7 @@ #include "mx-inlines.cc" #include "lo-error.h" -/* - * Diagonal Matrix class. - */ +// Diagonal Matrix class. int DiagMatrix::operator == (const DiagMatrix& a) const @@ -446,6 +444,7 @@ operator << (ostream& os, const DiagMatrix& a) { // int field_width = os.precision () + 7; + for (int i = 0; i < a.rows (); i++) { for (int j = 0; j < a.cols (); j++)
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -69,10 +69,10 @@ const int&, double*, double&, int&, double*, const int&, int&); -// Note that the original complex fft routines were not written for -// double complex arguments. They have been modified by adding an -// implicit double precision (a-h,o-z) statement at the beginning of -// each subroutine. + // Note that the original complex fft routines were not written for + // double complex arguments. They have been modified by adding an + // implicit double precision (a-h,o-z) statement at the beginning of + // each subroutine. int F77_FCN (cffti, CFFTI) (const int&, Complex*); @@ -81,9 +81,7 @@ int F77_FCN (cfftb, CFFTB) (const int&, Complex*, Complex*); } -/* - * Matrix class. - */ +// Matrix class. Matrix::Matrix (const DiagMatrix& a) : MArray2<double> (a.rows (), a.cols (), 0.0) @@ -2154,6 +2152,7 @@ operator << (ostream& os, const Matrix& a) { // int field_width = os.precision () + 7; + for (int i = 0; i < a.rows (); i++) { for (int j = 0; j < a.cols (); j++) @@ -2188,13 +2187,12 @@ return is; } -/* - * Read an array of data froma file in binary format. - */ +// Read an array of data froma file in binary format. + int Matrix::read (FILE *fptr, char *type) { -// Allocate buffer pointers. + // Allocate buffer pointers. union { @@ -2212,7 +2210,7 @@ } buf; -// Convert data to double. + // Convert data to double. if (! type) { @@ -2266,13 +2264,12 @@ return count; } -/* - * Write the data array to a file in binary format. - */ +// Write the data array to a file in binary format. + int Matrix::write (FILE *fptr, char *type) { -// Allocate buffer pointers. + // Allocate buffer pointers. union { @@ -2294,7 +2291,7 @@ double *d = fortran_vec (); -// Convert from double to correct size. + // Convert from double to correct size. if (! type) {
--- a/liboctave/dRowVector.cc +++ b/liboctave/dRowVector.cc @@ -52,9 +52,7 @@ const double*, const int&); } -/* - * Row Vector class. - */ +// Row Vector class. int RowVector::operator == (const RowVector& a) const @@ -226,7 +224,7 @@ if (len == 0 || a.cols () == 0) return RowVector (0); -// Transpose A to form A'*x == (x'*A)' + // Transpose A to form A'*x == (x'*A)' int a_nr = a.rows (); int a_nc = a.cols (); @@ -304,6 +302,7 @@ operator << (ostream& os, const RowVector& a) { // int field_width = os.precision () + 7; + for (int i = 0; i < a.length (); i++) os << " " /* setw (field_width) */ << a.elem (i); return os;
--- a/liboctave/dbleAEPBAL.cc +++ b/liboctave/dbleAEPBAL.cc @@ -56,14 +56,14 @@ int n = a_nc; -// Parameters for balance call. + // Parameters for balance call. int info; int ilo; int ihi; double *scale = new double [n]; -// Copy matrix into local structure. + // Copy matrix into local structure. balanced_mat = a; @@ -71,7 +71,7 @@ balanced_mat.fortran_vec (), n, ilo, ihi, scale, info, 1L, 1L); -// Initialize balancing matrix to identity. + // Initialize balancing matrix to identity. balancing_mat = Matrix (n, n, 0.0); for (int i = 0; i < n; i++)
--- a/liboctave/dbleCHOL.cc +++ b/liboctave/dbleCHOL.cc @@ -60,8 +60,8 @@ chol_mat = Matrix (h, n, n); -// If someone thinks of a more graceful way of doing this (or faster for -// that matter :-)), please let me know! + // If someone thinks of a more graceful way of doing this (or faster + // for that matter :-)), please let me know! if (n > 1) for (int j = 0; j < a_nc; j++)
--- a/liboctave/dbleGEPBAL.cc +++ b/liboctave/dbleGEPBAL.cc @@ -70,7 +70,7 @@ int n = a_nc; -// Parameters for balance call. + // Parameters for balance call. int info; int ilo; @@ -79,27 +79,27 @@ double *cperm = new double [n]; Matrix wk (n, 6, 0.0); -// Back out the permutations: -// -// cscale contains the exponents of the column scaling factors in its -// ilo through ihi locations and the reducing column permutations in -// its first ilo-1 and its ihi+1 through n locations. -// -// cperm contains the column permutations applied in grading the a and b -// submatrices in its ilo through ihi locations. -// -// wk contains the exponents of the row scaling factors in its ilo -// through ihi locations, the reducing row permutations in its first -// ilo-1 and its ihi+1 through n locations, and the row permutations -// applied in grading the a and b submatrices in its n+ilo through -// n+ihi locations. + // Back out the permutations: + // + // cscale contains the exponents of the column scaling factors in its + // ilo through ihi locations and the reducing column permutations in + // its first ilo-1 and its ihi+1 through n locations. + // + // cperm contains the column permutations applied in grading the a and b + // submatrices in its ilo through ihi locations. + // + // wk contains the exponents of the row scaling factors in its ilo + // through ihi locations, the reducing row permutations in its first + // ilo-1 and its ihi+1 through n locations, and the row permutations + // applied in grading the a and b submatrices in its n+ilo through + // n+ihi locations. -// Copy matrices into local structure. + // Copy matrices into local structure. balanced_a_mat = a; balanced_b_mat = b; -// Initialize balancing matrices to identity. + // Initialize balancing matrices to identity. left_balancing_mat = Matrix (n, n, 0.0); for (int i = 0; i < n; i++) @@ -107,7 +107,7 @@ right_balancing_mat = left_balancing_mat; -// Check for permutation option. + // Check for permutation option. if (*balance_job == 'P' || *balance_job == 'B') { @@ -117,14 +117,13 @@ } else { - -// Set up for scaling later. + // Set up for scaling later. ilo = 1; ihi = n; } -// Check for scaling option. + // Check for scaling option. if ((*balance_job == 'S' || *balance_job == 'B') && ilo != ihi) { @@ -134,8 +133,7 @@ } else { - -// Set scaling data to 0's. + // Set scaling data to 0's. for (int tmp = ilo-1; tmp < ihi; tmp++) { @@ -144,7 +142,7 @@ } } -// Scaleg returns exponents, not values, so... + // Scaleg returns exponents, not values, so... for (int tmp = ilo-1; tmp < ihi; tmp++) { @@ -152,21 +150,22 @@ wk.elem (tmp, 0) = pow (2.0, -wk.elem (tmp, 0)); } -// Column permutations/scaling. + // Column permutations/scaling. F77_FCN (dgebak, DGEBAK) (balance_job, "R", n, ilo, ihi, cscale, n, right_balancing_mat.fortran_vec (), n, info, 1L, 1L); -// Row permutations/scaling. + // Row permutations/scaling. F77_FCN (dgebak, DGEBAK) (balance_job, "L", n, ilo, ihi, wk.fortran_vec (), n, left_balancing_mat.fortran_vec (), n, info, 1L, 1L); -// XXX FIXME XXX --- these four lines need to be added and debugged. -// GEPBALANCE::init will work without them, though, so here they are. + // XXX FIXME XXX --- these four lines need to be added and + // debugged. GEPBALANCE::init will work without them, though, so + // here they are. #if 0 if ((*balance_job == 'P' || *balance_job == 'B') && ilo != ihi) @@ -177,7 +176,8 @@ } #endif -// Transpose for aa = cc*a*dd convention... + // Transpose for aa = cc*a*dd convention... + left_balancing_mat = left_balancing_mat.transpose (); delete [] cscale;
--- a/liboctave/dbleHESS.cc +++ b/liboctave/dbleHESS.cc @@ -95,14 +95,14 @@ F77_FCN (dgebak, DGEBAK) (jobbal, side, n, ilo, ihi, scale, n, z, n, info, 1L, 1L); -// We need to clear out all of the area below the sub-diagonal which was used -// to store the unitary matrix. + // We need to clear out all of the area below the sub-diagonal which + // was used to store the unitary matrix. hess_mat = Matrix (h, n, n); unitary_hess_mat = Matrix (z, n, n); -// If someone thinks of a more graceful way of doing this (or faster for -// that matter :-)), please let me know! + // If someone thinks of a more graceful way of doing this (or faster + // for that matter :-)), please let me know! if (n > 2) for (int j = 0; j < a_nc; j++)
--- a/liboctave/dbleQRP.cc +++ b/liboctave/dbleQRP.cc @@ -79,16 +79,16 @@ int *jpvt = new int[n]; -// Clear Pivot vector (code to enforce a certain permutation would go -// here...) + // Clear Pivot vector (code to enforce a certain permutation would + // go here...) for (int i = 0; i < n; i++) jpvt[i] = 0; F77_FCN (dgeqpf, DGEQPF) (m, n, tmp_data, m, jpvt, tau, work, info); -// Form Permutation matrix (if economy is requested, return the -// indices only!) + // Form Permutation matrix (if economy is requested, return the + // indices only!) if (qr_type == QR::economy && m > n) {
--- a/liboctave/dbleSCHUR.cc +++ b/liboctave/dbleSCHUR.cc @@ -93,7 +93,7 @@ double *q = new double [n*n]; double *work = new double [lwork]; -// These are not referenced for the non-ordered Schur routine. + // These are not referenced for the non-ordered Schur routine. int *iwork = 0; int *bwork = 0;
--- a/liboctave/mx-kludge.cc +++ b/liboctave/mx-kludge.cc @@ -76,9 +76,7 @@ #ifdef KLUDGE_VECTORS -/* - * Like type operations for vectors. - */ +// Like type operations for vectors. // Element by element vector by scalar ops. @@ -147,9 +145,7 @@ #ifdef KLUDGE_MATRICES -/* - * Like type operations for matrices - */ +// Like type operations for matrices. // Element by element matrix by scalar ops. @@ -220,9 +216,7 @@ #ifdef KLUDGE_DIAG_MATRICES -/* - * Like type operations for diagonal matrices. - */ +// Like type operations for diagonal matrices. // Element by element MDiagArray by scalar ops.
--- a/liboctave/sun-utils.cc +++ b/liboctave/sun-utils.cc @@ -25,11 +25,9 @@ #include <assert.h> -/* - * I think that this is really only needed if linking to Fortran - * compiled libraries on a Sun. It should never be called. - * There should probably be a sysdep.cc file, eh? - */ +// I think that this is really only needed if linking to Fortran +// compiled libraries on a Sun. It should never be called. +// There should probably be a sysdep.cc file, eh? extern "C" {