Mercurial > hg > octave-lyh
changeset 4585:a1ac9ab474a1
[project @ 2003-11-08 06:07:33 by jwe]
author | jwe |
---|---|
date | Sat, 08 Nov 2003 06:11:05 +0000 |
parents | f7697d703481 |
children | 7e08de0d1a98 |
files | liboctave/Array.cc liboctave/Array.h liboctave/ChangeLog liboctave/mk-ops.awk |
diffstat | 4 files changed, 28 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -1300,9 +1300,9 @@ template <class T> void -Array<T>::maybe_delete_elements (Array<idx_vector>& idx, const T& rfv) +Array<T>::maybe_delete_elements (Array<idx_vector>& ra_idx, const T& rfv) { - int n_idx = idx.length (); + int n_idx = ra_idx.length (); dim_vector lhs_dims = dims (); @@ -1316,9 +1316,9 @@ for (int i = 0; i < n_idx; i++) { - idx_is_colon_equiv(i) = idx(i).is_colon_equiv (lhs_dims(i), 1); - - idx_is_colon(i) = idx(i).is_colon (); + idx_is_colon_equiv(i) = ra_idx(i).is_colon_equiv (lhs_dims(i), 1); + + idx_is_colon(i) = ra_idx(i).is_colon (); } if (all_ones (idx_is_colon) || all_ones (idx_is_colon_equiv)) @@ -1377,9 +1377,9 @@ int non_col_dim = lhs_dims (non_col); - idx(non_col).sort (true); - - int num_to_delete = idx(non_col).length (lhs_dims (non_col)); + ra_idx(non_col).sort (true); + + int num_to_delete = ra_idx(non_col).length (lhs_dims (non_col)); if (num_to_delete > 0) { @@ -1407,7 +1407,7 @@ int iidx = 0; for (int j = 0; j < non_col_dim; j++) - if (j == idx(non_col).elem (iidx)) + if (j == ra_idx(non_col).elem (iidx)) { iidx++; @@ -1458,20 +1458,20 @@ if (i != non_col) num_elem *= lhs_dims (i); - num_elem *= idx(non_col).capacity (); + num_elem *= ra_idx(non_col).capacity (); for (int i = 0; i < n; i++) { if (numidx < num_elem - && is_in (result_idx(non_col), idx(non_col))) + && is_in (result_idx(non_col), ra_idx(non_col))) numidx++; else { Array<int> temp_result_idx = result_idx; - int num_lgt - = how_many_lgt (result_idx(non_col), idx(non_col)); + int num_lgt = how_many_lgt (result_idx(non_col), + ra_idx(non_col)); temp_result_idx(non_col) -= num_lgt;
--- a/liboctave/Array.h +++ b/liboctave/Array.h @@ -158,7 +158,7 @@ private: - Array<T>::ArrayRep *nil_rep (void) const + typename Array<T>::ArrayRep *nil_rep (void) const { static typename Array<T>::ArrayRep *nr = new typename Array<T>::ArrayRep ();
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,13 @@ +2003-11-08 John Eaton <osc0383@coe3.osc.edu> + + * Array.h (Array<T>::nil_rep): Qualify return type with typename. + + * mk-ops.awk: Delete elements of bool_headers array individually. + +2003-11-07 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array.cc (maybe_delete_elements): Rename arg idx to ra_idx. + 2003-10-31 Petter Risholm <risholm@stud.ntnu.no> * mx-inlines.cc (MX_ND_CUMULATIVE_OP): New macro.
--- a/liboctave/mk-ops.awk +++ b/liboctave/mk-ops.awk @@ -64,7 +64,6 @@ zero_val = (NF > n) ? $(++n) : ""; - delete bool_headers; k = 0 while (NF > n) bool_headers[k++] = $(++n); @@ -155,7 +154,10 @@ printf ("#include \"%s\"\n", h_file) >> cc_file; for (i in bool_headers) - printf ("#include \"%s\"\n", bool_headers[i]) >> cc_file; + { + printf ("#include \"%s\"\n", bool_headers[i]) >> cc_file; + delete bool_headers[i]; + } if (result_header) printf ("#include \"%s\"\n", result_header) >> cc_file;