87 #if ! defined (octave_oct_sort_h)
88 #define octave_oct_sort_h 1
90 #include "octave-config.h"
136 bool is_sorted_rows (
const T *data,
172 static const int MAX_MERGE_PENDING = 85;
176 static const int MIN_GALLOP = 7;
179 static const int MERGESTATE_TEMP_SIZE = 1024;
199 : m_min_gallop (), m_a (nullptr), m_ia (nullptr), m_alloced (0), m_n (0)
202 OCTAVE_DISABLE_COPY_MOVE (MergeState)
205 {
delete [] m_a;
delete [] m_ia; }
208 { m_min_gallop = MIN_GALLOP; m_n = 0; }
236 struct s_slice m_pending[MAX_MERGE_PENDING];
239 compare_fcn_type m_compare;
243 template <
typename Comp>
247 template <
typename Comp>
251 template <
typename Comp>
255 template <
typename Comp>
259 template <
typename Comp>
263 template <
typename Comp>
268 template <
typename Comp>
273 template <
typename Comp>
278 template <
typename Comp>
283 template <
typename Comp>
286 template <
typename Comp>
289 template <
typename Comp>
290 int merge_collapse (T *data, Comp comp);
292 template <
typename Comp>
295 template <
typename Comp>
296 int merge_force_collapse (T *data, Comp comp);
298 template <
typename Comp>
303 template <
typename Comp>
306 template <
typename Comp>
309 template <
typename Comp>
312 template <
typename Comp>
317 template <
typename Comp>
321 template <
typename Comp>
323 const T& value, Comp comp);
325 template <
typename Comp>
330 template <
typename Comp>
335 template <
typename Comp>
341 template <
typename T>
octave_idx_type lookup(const T *x, octave_idx_type n, T y)
void set_compare(const compare_fcn_type &comp)
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