Dynalib Utils
Static Public Member Functions | Static Protected Member Functions | List of all members
DynaSortList< T > Class Template Reference

#include <DynaSort.h>

Static Public Member Functions

static void mergeSort (T **array, int length, int low, int high, IDynaComparator< T *> &comparator)
 Sort an array of objects, typically those allocated with "new". More...
 
static void mergeSort (T **array, int length, IDynaComparator< T *> &comparator)
 
static void mergeSort (DynaList< T > *list, int low, int high, IDynaComparator< T *> &comparator)
 Sort the objects in a DynaList (vector) More...
 
static void mergeSort (DynaList< T > *list, IDynaComparator< T *> &comparator)
 

Static Protected Member Functions

static void _mergeSort (T **src, T **dest, int low, int high, IDynaComparator< T *> &comparator)
 
static void _swap (T **x, int a, int b)
 

Member Function Documentation

◆ _mergeSort()

template<class T >
void DynaSortList< T >::_mergeSort ( T **  src,
T **  dest,
int  low,
int  high,
IDynaComparator< T *> &  comparator 
)
staticprotected

◆ _swap()

template<class T >
void DynaSortList< T >::_swap ( T **  x,
int  a,
int  b 
)
staticprotected

◆ mergeSort() [1/4]

template<class T >
void DynaSortList< T >::mergeSort ( T **  array,
int  length,
int  low,
int  high,
IDynaComparator< T *> &  comparator 
)
static

Sort an array of objects, typically those allocated with "new".

Parameters
arrayof pointers to objects
lengthnumber of pointers in the array
lowstarting index (0-based)
highending index (must be less than length)
comparatorreference to the comparator function

◆ mergeSort() [2/4]

template<class T >
void DynaSortList< T >::mergeSort ( T **  array,
int  length,
IDynaComparator< T *> &  comparator 
)
static

◆ mergeSort() [3/4]

template<class T >
void DynaSortList< T >::mergeSort ( DynaList< T > *  list,
int  low,
int  high,
IDynaComparator< T *> &  comparator 
)
static

Sort the objects in a DynaList (vector)

Parameters
listpointer to the DynaList object
lowstarting index (0-based)
highending index (must be less than length)
comparatorreference to the comparator function

◆ mergeSort() [4/4]

template<class T >
void DynaSortList< T >::mergeSort ( DynaList< T > *  list,
IDynaComparator< T *> &  comparator 
)
static

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