Mercurial > hg > octave-nkf
changeset 2356:de9eb7bd4405
[project @ 1996-08-21 02:40:06 by jwe]
author | jwe |
---|---|
date | Wed, 21 Aug 1996 02:40:06 +0000 |
parents | c9f70d39255f |
children | 5ac79d79da10 |
files | liboctave/ChangeLog liboctave/idx-vector.cc liboctave/idx-vector.h |
diffstat | 3 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,9 @@ Tue Aug 20 17:38:46 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + * idx-vector.cc (IDX_VEC_REP::is_colon_equiv): Rename arg sort to + sort_uniq. If sort_uniq is nonzero, sort the elements and make + them uniq. + * CMatrix.cc (ComplexMatrix::row_max, ComplexMatrix::row_min, ComplexMatrix::column_max, ComplexMatrix::column_min): Rewrite. Also return index as a reference arg.
--- a/liboctave/idx-vector.cc +++ b/liboctave/idx-vector.cc @@ -378,7 +378,7 @@ } int -IDX_VEC_REP::is_colon_equiv (int n, int sort) +IDX_VEC_REP::is_colon_equiv (int n, int sort_uniq) { if (! colon_equiv_checked) { @@ -390,10 +390,14 @@ { int *tmp_data = copy_data (data, len); - if (sort) - sort_data (tmp_data, len); + int tmp_len = len; - int tmp_len = make_uniq (tmp_data, len); + if (sort_uniq) + { + sort_data (tmp_data, len); + + tmp_len = make_uniq (tmp_data, len); + } colon_equiv = ((tmp_len == 0 && n == 0) || (tmp_len == n
--- a/liboctave/idx-vector.h +++ b/liboctave/idx-vector.h @@ -90,7 +90,7 @@ int ones_count (void) const { return num_ones; } int is_colon (void) const { return colon; } - int is_colon_equiv (int n, int sort); + int is_colon_equiv (int n, int sort_uniq); int orig_rows (void) const { return orig_nr; } int orig_columns (void) const { return orig_nc; } @@ -203,8 +203,8 @@ int idx_vector::ones_count (void) const { return rep->ones_count (); } int is_colon (void) const { return rep->is_colon (); } - int is_colon_equiv (int n, int sort = 0) const - { return rep->is_colon_equiv (n, sort); } + int is_colon_equiv (int n, int sort_uniq = 0) const + { return rep->is_colon_equiv (n, sort_uniq); } int orig_rows (void) const { return rep->orig_rows (); } int orig_columns (void) const { return rep->orig_columns (); }