diff libinterp/corefcn/dot.cc @ 21660:53728df3e4c9

maint: for clarity, call ndims() rather than length() on dimension vectors. * ov-re-sparse.cc, QtHandlesUtils.cc, __lin_interpn__.cc, bsxfun.cc, cellfun.cc, data.cc, dot.cc, ellipj.cc, fft.cc, fft2.cc, fftn.cc, filter.cc, gl-render.cc, graphics.cc, mex.cc, oct-map.h, sub2ind.cc, symtab.cc, tril.cc, typecast.cc, utils.cc, variables.cc, ov-base-diag.cc, ov-base-int.cc, ov-base.cc, ov-base.h, ov-bool-mat.cc, ov-bool-sparse.cc, ov-cell.cc, ov-class.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-intx.h, ov-java.cc, ov-lazy-idx.cc, ov-re-mat.cc, ov-str-mat.cc, ov-struct.cc, ov.cc, pt-arg-list.cc, pt-mat.cc, Array-util.cc, Array.cc, Array.h, CNDArray.cc, CSparse.cc, Sparse.cc, Sparse.h, dNDArray.cc, dSparse.cc, dim-vector.cc, dim-vector.h, fCNDArray.cc, fNDArray.cc, idx-vector.cc, bsxfun.h, oct-fftw.cc, mx-inlines.cc, lo-array-errwarn.cc, lo-array-gripes.cc: For clarity, call ndims() rather than length() on dimension vectors.
author Rik <rik@octave.org>
date Mon, 02 May 2016 08:53:18 -0700
parents 40de9f8f23a6
children aba2e6293dd8
line wrap: on
line diff
--- a/libinterp/corefcn/dot.cc	Fri Apr 29 16:40:38 2016 -0400
+++ b/libinterp/corefcn/dot.cc	Mon May 02 08:53:18 2016 -0700
@@ -79,8 +79,8 @@
               dim_vector& z, octave_idx_type& m, octave_idx_type& n,
               octave_idx_type& k)
 {
-  int nd = x.length ();
-  assert (nd == y.length ());
+  int nd = x.ndims ();
+  assert (nd == y.ndims ());
   z = dim_vector::alloc (nd);
   m = 1, n = 1, k = 1;
   for (int i = 0; i < nd; i++)
@@ -298,12 +298,12 @@
 
   const dim_vector dimx = argx.dims ();
   const dim_vector dimy = argy.dims ();
-  int nd = dimx.length ();
+  int nd = dimx.ndims ();
   octave_idx_type m = dimx(0);
   octave_idx_type k = dimx(1);
   octave_idx_type n = dimy(1);
   octave_idx_type np = 1;
-  bool match = dimy(0) == k && nd == dimy.length ();
+  bool match = dimy(0) == k && nd == dimy.ndims ();
   dim_vector dimz = dim_vector::alloc (nd);
   dimz(0) = m;
   dimz(1) = n;