ezEngine  Milestone 7
ezSorting Class Reference

This class provides implementations of different sorting algorithms. More...

#include <Sorting.h>

Public Member Functions

template<typename Container , typename Comparer >
void QuickSort (Container &container, const Comparer &comparer)
 
template<typename T , typename Comparer >
void QuickSort (ezArrayPtr< T > &arrayPtr, const Comparer &comparer)
 
template<typename Container , typename Comparer >
void InsertionSort (Container &container, const Comparer &comparer)
 
template<typename T , typename Comparer >
void InsertionSort (ezArrayPtr< T > &arrayPtr, const Comparer &comparer)
 
template<typename Container , typename Comparer >
void QuickSort (Container &container, ezUInt32 uiStartIndex, ezUInt32 uiEndIndex, const Comparer &comparer)
 
template<typename Container , typename Comparer >
ezUInt32 Partition (Container &container, ezUInt32 uiLeft, ezUInt32 uiRight, const Comparer &comparer)
 
template<typename T , typename Comparer >
void QuickSort (ezArrayPtr< T > &arrayPtr, ezUInt32 uiStartIndex, ezUInt32 uiEndIndex, const Comparer &comparer)
 
template<typename T , typename Comparer >
ezUInt32 Partition (ezArrayPtr< T > &arrayPtr, ezUInt32 uiLeft, ezUInt32 uiRight, const Comparer &comparer)
 
template<typename Container , typename Comparer >
void InsertionSort (Container &container, ezUInt32 uiStartIndex, ezUInt32 uiEndIndex, const Comparer &comparer)
 
template<typename T , typename Comparer >
void InsertionSort (ezArrayPtr< T > &arrayPtr, ezUInt32 uiStartIndex, ezUInt32 uiEndIndex, const Comparer &comparer)
 

Static Public Member Functions

template<typename Container , typename Comparer >
static void QuickSort (Container &container, const Comparer &comparer=Comparer())
 Sorts the elements in container using a in-place quick sort implementation (not stable).
 
template<typename T , typename Comparer >
static void QuickSort (ezArrayPtr< T > &arrayPtr, const Comparer &comparer=Comparer())
 Sorts the elements in the array using a in-place quick sort implementation (not stable).
 
template<typename Container , typename Comparer >
static void InsertionSort (Container &container, const Comparer &comparer=Comparer())
 Sorts the elements in container using insertion sort (stable and in-place).
 
template<typename T , typename Comparer >
static void InsertionSort (ezArrayPtr< T > &arrayPtr, const Comparer &comparer=Comparer())
 Sorts the elements in the array using insertion sort (stable and in-place).
 

Private Types

enum  { INSERTION_THRESHOLD = 16 }
 

Static Private Member Functions

template<typename Container , typename Comparer >
static void QuickSort (Container &container, ezUInt32 uiStartIndex, ezUInt32 uiEndIndex, const Comparer &comparer)
 
template<typename Container , typename Comparer >
static ezUInt32 Partition (Container &container, ezUInt32 uiLeft, ezUInt32 uiRight, const Comparer &comparer)
 
template<typename T , typename Comparer >
static void QuickSort (ezArrayPtr< T > &arrayPtr, ezUInt32 uiStartIndex, ezUInt32 uiEndIndex, const Comparer &comparer)
 
template<typename T , typename Comparer >
static ezUInt32 Partition (ezArrayPtr< T > &arrayPtr, ezUInt32 uiLeft, ezUInt32 uiRight, const Comparer &comparer)
 
template<typename Container , typename Comparer >
static void InsertionSort (Container &container, ezUInt32 uiStartIndex, ezUInt32 uiEndIndex, const Comparer &comparer)
 
template<typename T , typename Comparer >
static void InsertionSort (ezArrayPtr< T > &arrayPtr, ezUInt32 uiStartIndex, ezUInt32 uiEndIndex, const Comparer &comparer)
 

Detailed Description

This class provides implementations of different sorting algorithms.


The documentation for this class was generated from the following files: