# HG changeset patch # User jwe # Date 1139512335 0 # Node ID 5be3463fed417f2aec5f40c446e72784b7ee0194 # Parent 9761b7d24e9eab98ffe9b0cb3256015a3f133838 [project @ 2006-02-09 19:12:14 by jwe] diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2006-02-09 John W. Eaton + + * mx-inlines.cc (MX_ND_CUMULATIVE_OP): Store in cummulative + product of all dimensions in CP. + 2006-02-09 David Bateman * SparseQR.cc: new file for real sparse QR class. diff --git a/liboctave/mx-inlines.cc b/liboctave/mx-inlines.cc --- a/liboctave/mx-inlines.cc +++ b/liboctave/mx-inlines.cc @@ -528,10 +528,12 @@ \ The strategy here is to access the elements of A along the \ dimension specified by DIM. This means that we loop over each \ - element of R and adjust the index into A as needed. */ \ + element of R and adjust the index into A as needed. Store the \ + cummulative product of all dimensions of A in CP. The last \ + element of CP is the total number of elements of A. */ \ \ - Array cp_sz (nd, 1); \ - for (int i = 1; i < nd; i++) \ + Array cp_sz (nd+1, 1); \ + for (int i = 1; i <= nd; i++) \ cp_sz(i) = cp_sz(i-1)*dv(i-1); \ \ octave_idx_type reset_at = cp_sz(dim); \