mirror of https://github.com/CGAL/cgal
temporary test using stable_sort to see whether the issue would be
fixed by fixing std::nth_element
This commit is contained in:
parent
47b19b1839
commit
9f1ce0c2b7
|
|
@ -33,10 +33,16 @@ namespace internal {
|
||||||
Cmp cmp = Cmp ())
|
Cmp cmp = Cmp ())
|
||||||
{
|
{
|
||||||
if (begin >= end) return begin;
|
if (begin >= end) return begin;
|
||||||
|
#if !defined(CGAL_DONT_USE_INDEPENDENT_SHUFFLE)
|
||||||
|
std::stable_sort (begin, end, cmp);
|
||||||
|
RandomAccessIterator middle = begin + (end - begin) / 2;
|
||||||
|
return middle;
|
||||||
|
#else
|
||||||
RandomAccessIterator middle = begin + (end - begin) / 2;
|
RandomAccessIterator middle = begin + (end - begin) / 2;
|
||||||
std::nth_element (begin, middle, end, cmp);
|
std::nth_element (begin, middle, end, cmp);
|
||||||
return middle;
|
return middle;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue