87 #if ! defined (octave_oct_sort_h)
88 #define octave_oct_sort_h 1
90 #include "octave-config.h"
140 bool is_sorted_rows (
const T *data,
176 static const int MAX_MERGE_PENDING = 85;
180 static const int MIN_GALLOP = 7;
183 static const int MERGESTATE_TEMP_SIZE = 1024;
203 : m_min_gallop (), m_a (nullptr), m_ia (nullptr), m_alloced (0), m_n (0)
213 {
delete [] m_a;
delete [] m_ia; }
216 { m_min_gallop = MIN_GALLOP; m_n = 0; }
244 struct s_slice m_pending[MAX_MERGE_PENDING];
251 template <
typename Comp>
255 template <
typename Comp>
259 template <
typename Comp>
263 template <
typename Comp>
267 template <
typename Comp>
271 template <
typename Comp>
276 template <
typename Comp>
281 template <
typename Comp>
286 template <
typename Comp>
291 template <
typename Comp>
294 template <
typename Comp>
297 template <
typename Comp>
298 int merge_collapse (T *data, Comp comp);
300 template <
typename Comp>
303 template <
typename Comp>
304 int merge_force_collapse (T *data, Comp comp);
306 template <
typename Comp>
311 template <
typename Comp>
314 template <
typename Comp>
317 template <
typename Comp>
320 template <
typename Comp>
325 template <
typename Comp>
329 template <
typename Comp>
331 const T& value, Comp comp);
333 template <
typename Comp>
338 template <
typename Comp>
343 template <
typename Comp>
349 template <
typename T>
octave_idx_type lookup(const T *x, octave_idx_type n, T y)
void set_compare(const compare_fcn_type &comp)
octave_sort(const octave_sort &)=delete
compare_fcn_type m_compare
std::function< bool(typename ref_param< T >::type, typename ref_param< T >::type)> compare_fcn_type
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