HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_Permute.h File Reference
#include "UT_API.h"
#include "UT_Assert.h"
#include "UT_MTwister.h"
#include "UT_StackBuffer.h"
#include "UT_Swap.h"
#include "UT_TBBParallelInvoke.h"
#include <algorithm>
#include <iterator>
#include <string.h>
+ Include dependency graph for UT_Permute.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UT_VariableSizeRef
 
struct  UT_VariableSizePtr
 
class  UT_Permute::Partition< T, INT >
 
class  UT_Permute::PartitionUnknown< INT >
 
class  UT_Permute::PartitionPermute< INT >
 

Namespaces

 UT_Permute
 

Functions

template<typename IT , typename PRED >
IT UTpartition (IT start, IT end, PRED isbeforesplit)
 
template<typename IT , typename COMPARE >
void UTnth_element (IT start, IT nth, IT end, COMPARE isAbeforeB)
 
template<typename IT >
void UTnth_element (IT start, IT nth, IT end)
 

Function Documentation

template<typename IT , typename COMPARE >
void UTnth_element ( IT  start,
IT  nth,
IT  end,
COMPARE  isAbeforeB 
)

This is a custom implementation of std::nth_element, just so that we don't keep having issues of different platforms giving different results.

(Having a comparator that forced strict ordering wasn't sufficient for std::nth_element, because that only guarantees that nth is greater than everything before it and less than everything after it. We'd have to then sort the two sections with the comparator have consistency.)

This implementation requires a comparator.

Definition at line 75 of file UT_Permute.h.

template<typename IT >
void UTnth_element ( IT  start,
IT  nth,
IT  end 
)

This is a custom implementation of std::nth_element, just so that we don't keep having issues of different platforms giving different results. This implementation uses std::less.

Definition at line 163 of file UT_Permute.h.

template<typename IT , typename PRED >
IT UTpartition ( IT  start,
IT  end,
PRED  isbeforesplit 
)

This is a custom implementation of std::partition, just so that we don't keep having issues of different platforms giving different results.

This implementation requires bidirectional iterators.

Definition at line 33 of file UT_Permute.h.