Mercurial > octave
diff liboctave/sparse-base-chol.cc @ 15018:3d8ace26c5b4
maint: Use Octave coding conventions for cuddled parentheses in liboctave/.
* Array-util.cc, Array.cc, Array.h, CMatrix.cc, CNDArray.cc, CSparse.cc,
CmplxQR.cc, CollocWt.cc, DASPK.cc, DASRT.cc, DASSL.cc, EIG.cc, LSODE.cc,
MSparse.cc, MatrixType.cc, Sparse-op-defs.h, Sparse-perm-op-defs.h, Sparse.cc,
Sparse.h, SparseCmplxCHOL.cc, SparseCmplxLU.cc, SparseCmplxQR.cc, SparseQR.cc,
SparsedbleCHOL.cc, SparsedbleLU.cc, boolSparse.cc, cmd-hist.cc, dDiagMatrix.cc,
dMatrix.cc, dNDArray.cc, dSparse.cc, data-conv.cc, dbleQR.cc, dbleSVD.cc,
dim-vector.cc, eigs-base.cc, f2c-main.c, fCMatrix.cc, fCNDArray.cc,
fCmplxQR.cc, fEIG.cc, fMatrix.cc, fNDArray.cc, floatQR.cc, floatSVD.cc,
idx-vector.cc, kpse.cc, lo-specfun.cc, mx-inlines.cc, mx-op-defs.h,
oct-alloc.cc, oct-binmap.h, oct-fftw.cc, oct-group.h, oct-inttypes.cc,
oct-inttypes.h, oct-locbuf.cc, oct-md5.cc, oct-rand.cc, oct-sort.cc,
oct-syscalls.cc, randgamma.c, randmtzig.c, randpoisson.c, sparse-base-chol.cc,
sparse-base-lu.cc, sparse-dmsolve.cc, str-vec.cc, str-vec.h, tempnam.c,
tempname.c: Use Octave coding conventions for cuddled parentheses in liboctave/.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 26 Jul 2012 08:13:22 -0700 |
parents | 460a3c6d8bf1 |
children | 560317fd5977 |
line wrap: on
line diff
--- a/liboctave/sparse-base-chol.cc Wed Jul 25 20:58:21 2012 -0700 +++ b/liboctave/sparse-base-chol.cc Thu Jul 26 08:13:22 2012 -0700 @@ -56,24 +56,24 @@ for (k = 0; k < ncol; k++) { - p = Sp [k]; + p = Sp[k]; pend = Sp [k+1]; - Sp [k] = pdest; + Sp[k] = pdest; for (; p < pend; p++) { - sik = Sx [p]; + sik = Sx[p]; if (CHOLMOD_IS_NONZERO (sik)) { if (p != pdest) { - Si [pdest] = Si [p]; - Sx [pdest] = sik; + Si[pdest] = Si[p]; + Sx[pdest] = sik; } pdest++; } } } - Sp [ncol] = pdest; + Sp[ncol] = pdest; } #endif @@ -157,7 +157,7 @@ if (natural) { cm->nmethods = 1 ; - cm->method [0].ordering = CHOLMOD_NATURAL ; + cm->method[0].ordering = CHOLMOD_NATURAL ; cm->postorder = false ; } @@ -229,11 +229,11 @@ octave_idx_type nnz = m->nzmax; chol_type ret (m->nrow, nc, nnz); for (octave_idx_type j = 0; j < nc+1; j++) - ret.xcidx(j) = static_cast<octave_idx_type *>(m->p)[j]; + ret.xcidx (j) = static_cast<octave_idx_type *>(m->p)[j]; for (octave_idx_type i = 0; i < nnz; i++) { - ret.xridx(i) = static_cast<octave_idx_type *>(m->i)[i]; - ret.xdata(i) = static_cast<chol_elt *>(m->x)[i]; + ret.xridx (i) = static_cast<octave_idx_type *>(m->i)[i]; + ret.xdata (i) = static_cast<chol_elt *>(m->x)[i]; } return ret; #else @@ -252,11 +252,11 @@ for (octave_idx_type i = 0; i < n; i++) { - p.xcidx(i) = i; - p.xridx(i) = static_cast<octave_idx_type>(perms(i)); - p.xdata(i) = 1; + p.xcidx (i) = i; + p.xridx (i) = static_cast<octave_idx_type>(perms (i)); + p.xdata (i) = 1; } - p.xcidx(n) = n; + p.xcidx (n) = n; return p; #else @@ -277,7 +277,7 @@ double rcond2; octave_idx_type info; MatrixType mattype (MatrixType::Upper); - chol_type linv = L ().hermitian ().inverse(mattype, info, rcond2, 1, 0); + chol_type linv = L ().hermitian ().inverse (mattype, info, rcond2, 1, 0); if (perms.length () == n) {