2004-09-15 David Bateman
* oct-sort.h (void octave_sort::set_compare (bool (*comp) (T,T))):
New function to set the comparison function for the sort.
2004-09-15 David Bateman
* ov.cc (octave_value::octave_value (const ArrayN&, bool)):
New Constructor .
* ov.h (octave_value::octave_value (const ArrayN&, bool)):
Declaration.
* DLD-FUNCTIONS/sort.cc (sortmode): New enum to define direction of
sort.
(template class vec_index): New class to contain values and
index for indexed sorts, replacing all previous struct versions.
Instantiate for double, Complex, char and octave_value.
(template static octave_value_list mx_sort (ArrayN &, int,
sortmode)): New templated version of mx_sort replacing all previous
versions, but specific to non indexed sorts. Instantiate for char
and double if not IEEE754.
(template <> static octave_value_list mx_sort (ArrayN &,
int, sortmode)): Specialized function of mx_sort of IEEE754.
(template static octave_value_list mx_sort_indexed
(ArrayN &, int, sortmode)): New templated version of mx_sort
for indexed sorts. Instantiate for double, Complex, char and
octave_value.
(ascending_compare, descending_compare): Comparison functions
for double, char, vec_index *, vec_index *,
vec_index *, vec_index. Fix Complex comparison
operator to sort by arg of values if absolute values are equal.
(Fsort): Update docs for new mode argument and for sorting of
strings and cell arrays of strings. Implement mode argument to
define ascending and descending sorts. Include sorting of cell
arrays of strings. Adapt for new templated versions of the mx_sort
function.