87 #if ! defined (octave_oct_sort_h)
88 #define octave_oct_sort_h 1
90 #include "octave-config.h"
137 bool is_sorted_rows (
const T *data,
173 static const int MAX_MERGE_PENDING = 85;
177 static const int MIN_GALLOP = 7;
180 static const int MERGESTATE_TEMP_SIZE = 1024;
198 : m_min_gallop (), m_a (nullptr), m_ia (nullptr), m_alloced (0), m_n (0)
208 {
delete [] m_a;
delete [] m_ia; }
211 { m_min_gallop = MIN_GALLOP; m_n = 0; }
238 struct s_slice m_pending[MAX_MERGE_PENDING];
245 template <
typename Comp>
249 template <
typename Comp>
253 template <
typename Comp>
257 template <
typename Comp>
261 template <
typename Comp>
265 template <
typename Comp>
270 template <
typename Comp>
275 template <
typename Comp>
280 template <
typename Comp>
285 template <
typename Comp>
288 template <
typename Comp>
291 template <
typename Comp>
292 int merge_collapse (T *data, Comp comp);
294 template <
typename Comp>
297 template <
typename Comp>
298 int merge_force_collapse (T *data, Comp comp);
300 template <
typename Comp>
305 template <
typename Comp>
308 template <
typename Comp>
311 template <
typename Comp>
314 template <
typename Comp>
319 template <
typename Comp>
323 template <
typename Comp>
325 const T& value, Comp comp);
327 template <
typename Comp>
332 template <
typename Comp>
337 template <
typename Comp>
343 template <
typename T>
octave_idx_type lookup(const T *x, octave_idx_type n, T y)
void set_compare(compare_fcn_type comp)
octave_sort(const octave_sort &)=delete
compare_fcn_type m_compare
if_then_else< is_class_type< T >::no, T, T const & >::result type
MergeState(const MergeState &)=delete
octave_idx_type m_alloced
octave_idx_type m_min_gallop