Mercurial > hg > octave-jordi
diff liboctave/Array-f.cc @ 8725:d5af326a3ede
[mq]: sort-traits
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 12 Feb 2009 02:49:14 -0500 |
parents | e9cb742df9eb |
children | eb63fbe60fab |
line wrap: on
line diff
--- a/liboctave/Array-f.cc +++ b/liboctave/Array-f.cc @@ -37,26 +37,28 @@ #include "oct-sort.cc" template <> -inline bool _sort_isnan (float x) +inline bool +sort_isnan<float> (float x) { return lo_ieee_isnan (x); } -static bool nan_ascending_compare (float x, float y) +static bool +nan_ascending_compare (float x, float y) { return lo_ieee_isnan (y) ? ! lo_ieee_isnan (x) : x < y; } -static bool nan_descending_compare (float x, float y) +static bool +nan_descending_compare (float x, float y) { return lo_ieee_isnan (x) ? ! lo_ieee_isnan (y) : x > y; } -bool (*_sortrows_comparator (sortmode mode, - const Array<float>& a , bool allow_chk)) -(float, float) +Array<float>::compare_fcn_type +sortrows_comparator (sortmode mode, const Array<float>& a , bool allow_chk) { - bool (*result) (float, float) = 0; + Array<float>::compare_fcn_type result = 0; if (allow_chk) {