diff liboctave/Sparse.h @ 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.h	Wed Jul 25 20:58:21 2012 -0700
+++ b/liboctave/Sparse.h	Thu Jul 26 08:13:22 2012 -0700
@@ -72,7 +72,7 @@
     octave_refcount<int> count;
 
     SparseRep (void)
-      : d (0), r (0), c (new octave_idx_type [1]), nzmx (0), nrows (0),
+      : d (0), r (0), c (new octave_idx_type[1]), nzmx (0), nrows (0),
       ncols (0), count (1)
       {
         c[0] = 0;
@@ -87,7 +87,7 @@
       }
 
     SparseRep (octave_idx_type nr, octave_idx_type nc, octave_idx_type nz = 0)
-      : d (new T [nz]), r (new octave_idx_type [nz]),
+      : d (new T[nz]), r (new octave_idx_type[nz]),
       c (new octave_idx_type [nc+1]), nzmx (nz), nrows (nr),
       ncols (nc), count (1)
       {
@@ -111,7 +111,7 @@
 
     octave_idx_type length (void) const { return nzmx; }
 
-    octave_idx_type nnz (void) const { return c [ncols]; }
+    octave_idx_type nnz (void) const { return c[ncols]; }
 
     T& elem (octave_idx_type _r, octave_idx_type _c);
 
@@ -268,7 +268,7 @@
   octave_idx_type get_col_index (octave_idx_type k)
   {
     octave_idx_type ret = 0;
-    while (cidx(ret+1) < k)
+    while (cidx (ret+1) < k)
       ret++;
     return ret;
   }
@@ -599,11 +599,11 @@
         result = Sparse<U> (nr, nc, f_zero);
 
         for (octave_idx_type j = 0; j < nc; j++)
-          for (octave_idx_type i = cidx(j); i < cidx (j+1); i++)
+          for (octave_idx_type i = cidx (j); i < cidx (j+1); i++)
             {
               octave_quit ();
               /* Use data instead of elem for better performance.  */
-              result.data (ridx (i) + j * nr) = fcn (data(i));
+              result.data (ridx (i) + j * nr) = fcn (data (i));
             }
 
         result.maybe_compress (true);
@@ -620,7 +620,7 @@
 
         for (octave_idx_type j = 0; j < nc; j++)
           {
-            for (octave_idx_type i = cidx(j); i < cidx (j+1); i++)
+            for (octave_idx_type i = cidx (j); i < cidx (j+1); i++)
               {
                 U val = fcn (data (i));
                 if (val != 0.0)
@@ -709,7 +709,7 @@
           else if (jtmp > jold)
             {
               for (octave_idx_type j = jold; j < jtmp; j++)
-                a.cidx(j+1) = ii;
+                a.cidx (j+1) = ii;
             }
           else if (itmp < iold)
             {
@@ -734,7 +734,7 @@
         }
 
       for (octave_idx_type j = jold; j < nc; j++)
-        a.cidx(j+1) = ii;
+        a.cidx (j+1) = ii;
     }
 
  done: