Mercurial > hg > octave-avbm
changeset 8734:767ed8cc6634
rename internal issorted and issorted_rows functions to is_sorted and is_sorted_rows
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 12 Feb 2009 15:29:12 -0500 |
parents | 3ef774603887 |
children | afbfd7f4fd93 |
files | src/ChangeLog src/data.cc src/ov-base-diag.h src/ov-base-mat.h src/ov-base-scalar.h src/ov-base-sparse.h src/ov-base.cc src/ov-base.h src/ov-perm.h src/ov-range.h src/ov.h |
diffstat | 11 files changed, 33 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2009-02-12 John W. Eaton <jwe@octave.org> + * data.cc, ov-base-diag.h, ov-base-mat.h, ov-base-scalar.h, + ov-base-sparse.h, ov-base.cc, ov-base.h, ov-perm.h, ov-range.h, + ov.h: Rename internal issorted and issorted_rows functions to + is_sorted and is_sorted_rows. + * ov-base-diag.h, ov-base-mat.h, ov-base-scalar.h, ov-base.h, ov-cell.h, ov-perm.h, ov-range.h, ov.h, data.cc, ov-base.cc, ov-cell.cc: Rename all uses of sortrows_idx to sort_rows_idx.
--- a/src/data.cc +++ b/src/data.cc @@ -5645,7 +5645,7 @@ { octave_value arg = args(0); if (arg.dims ().is_vector ()) - retval = args(0).issorted () != UNSORTED; + retval = args(0).is_sorted () != UNSORTED; else error ("issorted: needs a vector"); } @@ -5659,7 +5659,7 @@ if (arg.is_sparse_type ()) error ("issorted: sparse matrices not yet supported"); if (arg.ndims () == 2) - retval = arg.issorted_rows (smode) != UNSORTED; + retval = arg.is_sorted_rows (smode) != UNSORTED; else error ("issorted: needs a 2-dimensional object"); }
--- a/src/ov-base-diag.h +++ b/src/ov-base-diag.h @@ -106,14 +106,14 @@ sortmode mode = ASCENDING) const { return to_dense ().sort (sidx, dim, mode); } - sortmode issorted (sortmode mode = UNSORTED) const - { return to_dense ().issorted (mode); } + sortmode is_sorted (sortmode mode = UNSORTED) const + { return to_dense ().is_sorted (mode); } Array<octave_idx_type> sort_rows_idx (sortmode mode = ASCENDING) const { return to_dense ().sort_rows_idx (mode); } - sortmode issorted_rows (sortmode mode = UNSORTED) const - { return to_dense ().issorted_rows (mode); } + sortmode is_sorted_rows (sortmode mode = UNSORTED) const + { return to_dense ().is_sorted_rows (mode); } bool is_matrix_type (void) const { return true; }
--- a/src/ov-base-mat.h +++ b/src/ov-base-mat.h @@ -124,13 +124,13 @@ sortmode mode = ASCENDING) const { return octave_value (matrix.sort (sidx, dim, mode)); } - sortmode issorted (sortmode mode = UNSORTED) const + sortmode is_sorted (sortmode mode = UNSORTED) const { return matrix.is_sorted (mode); } Array<octave_idx_type> sort_rows_idx (sortmode mode = ASCENDING) const { return matrix.sort_rows_idx (mode); } - sortmode issorted_rows (sortmode mode = UNSORTED) const + sortmode is_sorted_rows (sortmode mode = UNSORTED) const { return matrix.is_sorted_rows (mode); } bool is_matrix_type (void) const { return true; }
--- a/src/ov-base-scalar.h +++ b/src/ov-base-scalar.h @@ -108,13 +108,13 @@ return octave_value (scalar); } - sortmode issorted (sortmode mode = UNSORTED) const + sortmode is_sorted (sortmode mode = UNSORTED) const { return mode ? mode : ASCENDING; } Array<octave_idx_type> sort_rows_idx (sortmode) const { return Array<octave_idx_type> (1, 0); } - sortmode issorted_rows (sortmode mode = UNSORTED) const + sortmode is_sorted_rows (sortmode mode = UNSORTED) const { return mode ? mode : ASCENDING; } MatrixType matrix_type (void) const { return typ; }
--- a/src/ov-base-sparse.h +++ b/src/ov-base-sparse.h @@ -126,8 +126,8 @@ sortmode mode = ASCENDING) const { return octave_value (matrix.sort (sidx, dim, mode)); } - sortmode issorted (sortmode mode = UNSORTED) const - { return full_value ().issorted (mode); } + sortmode is_sorted (sortmode mode = UNSORTED) const + { return full_value ().is_sorted (mode); } MatrixType matrix_type (void) const { return typ; } MatrixType matrix_type (const MatrixType& _typ) const
--- a/src/ov-base.cc +++ b/src/ov-base.cc @@ -988,9 +988,9 @@ } sortmode -octave_base_value::issorted (sortmode) const +octave_base_value::is_sorted (sortmode) const { - gripe_wrong_type_arg ("octave_base_value::issorted ()", type_name ()); + gripe_wrong_type_arg ("octave_base_value::is_sorted ()", type_name ()); return UNSORTED; } @@ -1004,9 +1004,9 @@ } sortmode -octave_base_value::issorted_rows (sortmode) const +octave_base_value::is_sorted_rows (sortmode) const { - gripe_wrong_type_arg ("octave_base_value::issorted_rows ()", type_name ()); + gripe_wrong_type_arg ("octave_base_value::is_sorted_rows ()", type_name ()); return UNSORTED; }
--- a/src/ov-base.h +++ b/src/ov-base.h @@ -517,12 +517,12 @@ octave_idx_type dim = 0, sortmode mode = ASCENDING) const; - virtual sortmode issorted (sortmode mode = UNSORTED) const; + virtual sortmode is_sorted (sortmode mode = UNSORTED) const; virtual Array<octave_idx_type> sort_rows_idx (sortmode mode = ASCENDING) const; - virtual sortmode issorted_rows (sortmode mode = UNSORTED) const; + virtual sortmode is_sorted_rows (sortmode mode = UNSORTED) const; virtual void lock (void);
--- a/src/ov-perm.h +++ b/src/ov-perm.h @@ -93,14 +93,14 @@ sortmode mode = ASCENDING) const { return to_dense ().sort (sidx, dim, mode); } - sortmode issorted (sortmode mode = UNSORTED) const - { return to_dense ().issorted (mode); } + sortmode is_sorted (sortmode mode = UNSORTED) const + { return to_dense ().is_sorted (mode); } Array<octave_idx_type> sort_rows_idx (sortmode mode = ASCENDING) const { return to_dense ().sort_rows_idx (mode); } - sortmode issorted_rows (sortmode mode = UNSORTED) const - { return to_dense ().issorted_rows (mode); } + sortmode is_sorted_rows (sortmode mode = UNSORTED) const + { return to_dense ().is_sorted_rows (mode); } bool is_perm_matrix (void) const { return true; }
--- a/src/ov-range.h +++ b/src/ov-range.h @@ -140,13 +140,13 @@ sortmode mode = ASCENDING) const { return range.sort (sidx, dim, mode); } - sortmode issorted (sortmode mode = UNSORTED) const + sortmode is_sorted (sortmode mode = UNSORTED) const { return range.is_sorted (mode); } Array<octave_idx_type> sort_rows_idx (sortmode) const { return Array<octave_idx_type> (1, 0); } - sortmode issorted_rows (sortmode mode = UNSORTED) const + sortmode is_sorted_rows (sortmode mode = UNSORTED) const { return mode ? mode : ASCENDING; } bool is_real_type (void) const { return true; }
--- a/src/ov.h +++ b/src/ov.h @@ -999,14 +999,14 @@ sortmode mode = ASCENDING) const { return rep->sort (sidx, dim, mode); } - sortmode issorted (sortmode mode = UNSORTED) const - { return rep->issorted (mode); } + sortmode is_sorted (sortmode mode = UNSORTED) const + { return rep->is_sorted (mode); } Array<octave_idx_type> sort_rows_idx (sortmode mode = ASCENDING) const { return rep->sort_rows_idx (mode); } - sortmode issorted_rows (sortmode mode = UNSORTED) const - { return rep->issorted_rows (mode); } + sortmode is_sorted_rows (sortmode mode = UNSORTED) const + { return rep->is_sorted_rows (mode); } void lock (void) { rep->lock (); }