Mercurial > hg > octave-lyh
diff liboctave/Sparse.h @ 7433:402168152bb9
[project @ 2008-01-31 18:59:09 by dbateman]
author | dbateman |
---|---|
date | Thu, 31 Jan 2008 18:59:11 +0000 |
parents | a1dbe9d80eee |
children | 2467639bd8c0 |
line wrap: on
line diff
--- a/liboctave/Sparse.h +++ b/liboctave/Sparse.h @@ -35,6 +35,8 @@ #include "dim-vector.h" #include "lo-utils.h" +#include "oct-sort.h" + class idx_vector; // Two dimensional sparse class. Handles the reference counting for @@ -515,6 +517,10 @@ octave_idx_type *mex_get_ir (void) const { return const_cast<octave_idx_type *> (ridx ()); } octave_idx_type *mex_get_jc (void) const { return const_cast<octave_idx_type *> (cidx ()); } + + Sparse<T> sort (octave_idx_type dim = 0, sortmode mode = UNDEFINED) const; + Sparse<T> sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, + sortmode mode = UNDEFINED) const; }; // NOTE: these functions should be friends of the Sparse<T> class and @@ -540,6 +546,11 @@ INSTANTIATE_SPARSE (T, API); \ INSTANTIATE_SPARSE_ASSIGN (T, T, API) +#define INSTANTIATE_SPARSE_SORT(T) \ + template class octave_sort<T>; \ + template class vec_index<T>; \ + template class octave_sort<vec_index<T> *>; + #endif /*