comparison liboctave/array/dSparse.cc @ 18084:8e056300994b

Follow coding convention of defining and initializing only 1 variable per line in liboctave. * liboctave/array/Array-b.cc, liboctave/array/Array-util.cc, liboctave/array/Array.cc, liboctave/array/CDiagMatrix.cc, liboctave/array/CMatrix.cc, liboctave/array/CSparse.cc, liboctave/array/MDiagArray2.cc, liboctave/array/MatrixType.cc, liboctave/array/PermMatrix.cc, liboctave/array/Sparse.cc, liboctave/array/Sparse.h, liboctave/array/boolSparse.cc, liboctave/array/dDiagMatrix.cc, liboctave/array/dMatrix.cc, liboctave/array/dSparse.cc, liboctave/array/dim-vector.cc, liboctave/array/fCDiagMatrix.cc, liboctave/array/fCMatrix.cc, liboctave/array/fDiagMatrix.cc, liboctave/array/fMatrix.cc, liboctave/array/idx-vector.cc, liboctave/array/idx-vector.h, liboctave/numeric/CmplxLU.cc, liboctave/numeric/CmplxQR.cc, liboctave/numeric/base-qr.cc, liboctave/numeric/bsxfun-defs.cc, liboctave/numeric/bsxfun.h, liboctave/numeric/dbleLU.cc, liboctave/numeric/dbleQR.cc, liboctave/numeric/fCmplxLU.cc, liboctave/numeric/fCmplxQR.cc, liboctave/numeric/floatLU.cc, liboctave/numeric/floatQR.cc, liboctave/numeric/lo-specfun.cc, liboctave/numeric/oct-convn.cc, liboctave/numeric/oct-norm.cc, liboctave/numeric/sparse-dmsolve.cc, liboctave/operators/mx-inlines.cc, liboctave/operators/mx-op-defs.h, liboctave/util/caseless-str.h, liboctave/util/kpse.cc, liboctave/util/lo-utils.cc, liboctave/util/oct-binmap.h, liboctave/util/oct-cmplx.h, liboctave/util/oct-inttypes.cc, liboctave/util/oct-inttypes.h, liboctave/util/oct-sort.cc: Follow coding convention of defining and initializing only 1 variable per line in liboctave.
author Rik <rik@octave.org>
date Wed, 04 Dec 2013 22:13:18 -0800
parents 938f01339043
children b3f443b4802b
comparison
equal deleted inserted replaced
18083:938f01339043 18084:8e056300994b
163 } 163 }
164 164
165 SparseMatrix::SparseMatrix (const DiagMatrix& a) 165 SparseMatrix::SparseMatrix (const DiagMatrix& a)
166 : MSparse<double> (a.rows (), a.cols (), a.length ()) 166 : MSparse<double> (a.rows (), a.cols (), a.length ())
167 { 167 {
168 octave_idx_type j = 0, l = a.length (); 168 octave_idx_type j = 0;
169 octave_idx_type l = a.length ();
169 for (octave_idx_type i = 0; i < l; i++) 170 for (octave_idx_type i = 0; i < l; i++)
170 { 171 {
171 cidx (i) = j; 172 cidx (i) = j;
172 if (a(i, i) != 0.0) 173 if (a(i, i) != 0.0)
173 { 174 {
875 // Force make_unique to be called 876 // Force make_unique to be called
876 double *v = retval.data (); 877 double *v = retval.data ();
877 878
878 if (calccond) 879 if (calccond)
879 { 880 {
880 double dmax = 0., dmin = octave_Inf; 881 double dmax = 0.;
882 double dmin = octave_Inf;
881 for (octave_idx_type i = 0; i < nr; i++) 883 for (octave_idx_type i = 0; i < nr; i++)
882 { 884 {
883 double tmp = fabs (v[i]); 885 double tmp = fabs (v[i]);
884 if (tmp > dmax) 886 if (tmp > dmax)
885 dmax = tmp; 887 dmax = tmp;
1410 for (octave_idx_type i = cidx (k); i < cidx (k+1); i++) 1412 for (octave_idx_type i = cidx (k); i < cidx (k+1); i++)
1411 retval(k,j) = b(ridx (i),j) / data (i); 1413 retval(k,j) = b(ridx (i),j) / data (i);
1412 1414
1413 if (calc_cond) 1415 if (calc_cond)
1414 { 1416 {
1415 double dmax = 0., dmin = octave_Inf; 1417 double dmax = 0.;
1418 double dmin = octave_Inf;
1416 for (octave_idx_type i = 0; i < nm; i++) 1419 for (octave_idx_type i = 0; i < nm; i++)
1417 { 1420 {
1418 double tmp = fabs (data (i)); 1421 double tmp = fabs (data (i));
1419 if (tmp > dmax) 1422 if (tmp > dmax)
1420 dmax = tmp; 1423 dmax = tmp;
1500 retval.xcidx (j+1) = ii; 1503 retval.xcidx (j+1) = ii;
1501 } 1504 }
1502 1505
1503 if (calc_cond) 1506 if (calc_cond)
1504 { 1507 {
1505 double dmax = 0., dmin = octave_Inf; 1508 double dmax = 0.;
1509 double dmin = octave_Inf;
1506 for (octave_idx_type i = 0; i < nm; i++) 1510 for (octave_idx_type i = 0; i < nm; i++)
1507 { 1511 {
1508 double tmp = fabs (data (i)); 1512 double tmp = fabs (data (i));
1509 if (tmp > dmax) 1513 if (tmp > dmax)
1510 dmax = tmp; 1514 dmax = tmp;
1560 for (octave_idx_type i = cidx (k); i < cidx (k+1); i++) 1564 for (octave_idx_type i = cidx (k); i < cidx (k+1); i++)
1561 retval(k,j) = b(ridx (i),j) / data (i); 1565 retval(k,j) = b(ridx (i),j) / data (i);
1562 1566
1563 if (calc_cond) 1567 if (calc_cond)
1564 { 1568 {
1565 double dmax = 0., dmin = octave_Inf; 1569 double dmax = 0.;
1570 double dmin = octave_Inf;
1566 for (octave_idx_type i = 0; i < nm; i++) 1571 for (octave_idx_type i = 0; i < nm; i++)
1567 { 1572 {
1568 double tmp = fabs (data (i)); 1573 double tmp = fabs (data (i));
1569 if (tmp > dmax) 1574 if (tmp > dmax)
1570 dmax = tmp; 1575 dmax = tmp;
1650 retval.xcidx (j+1) = ii; 1655 retval.xcidx (j+1) = ii;
1651 } 1656 }
1652 1657
1653 if (calc_cond) 1658 if (calc_cond)
1654 { 1659 {
1655 double dmax = 0., dmin = octave_Inf; 1660 double dmax = 0.;
1661 double dmin = octave_Inf;
1656 for (octave_idx_type i = 0; i < nm; i++) 1662 for (octave_idx_type i = 0; i < nm; i++)
1657 { 1663 {
1658 double tmp = fabs (data (i)); 1664 double tmp = fabs (data (i));
1659 if (tmp > dmax) 1665 if (tmp > dmax)
1660 dmax = tmp; 1666 dmax = tmp;