XII Release 0.1.0
Loading...
Searching...
No Matches
xiiSorting Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <Sorting.h>

Static Public Member Functions

template<typename Container, typename Comparer>
static void QuickSort (Container &ref_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 (xiiArrayPtr< T > &ref_pArray, 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 &ref_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 (xiiArrayPtr< T > &ref_pArray, const Comparer &comparer=Comparer())
 Sorts the elements in the array using insertion sort (stable and in-place).
template<typename Container, typename Comparer>
static void BubbleSort (Container &ref_container, const Comparer &comparer=Comparer())
 Sorts the elements in container using bubble sort (stable and in-place).
template<typename T, typename Comparer>
static void BubbleSort (xiiArrayPtr< T > &ref_pArray, const Comparer &comparer=Comparer())
 Sorts the elements in the array using bubble sort (stable and in-place).
template<typename Container, typename Comparer>
static void SelectionSort (Container &ref_container, const Comparer &comparer=Comparer())
 Sorts the elements in container using selection sort (unstable and in-place).
template<typename T, typename Comparer>
static void SelectionSort (xiiArrayPtr< T > &ref_pArray, const Comparer &comparer=Comparer())
 Sorts the elements in the array using selection sort (unstable and in-place).
template<typename Container, typename Comparer>
static void SelectionSortStable (Container &ref_container, const Comparer &comparer=Comparer())
 Sorts the elements in container using selection sort (stable and in-place).
template<typename T, typename Comparer>
static void SelectionSortStable (xiiArrayPtr< T > &ref_pArray, const Comparer &comparer=Comparer())
 Sorts the elements in the array using selection sort (stable and in-place).
template<typename Container, typename Comparer>
static void MergeSort (Container &ref_container, const Comparer &comparer=Comparer())
 Sorts the elements in container using merge sort (stable and not in-place).
template<typename T, typename Comparer>
static void MergeSort (xiiArrayPtr< T > &ref_pArray, const Comparer &comparer=Comparer())
 Sorts the elements in the array using merge sort (stable and not in-place).
template<typename Container, typename ScratchContainer, typename KeyFunc>
static void RadixSort (Container &ref_container, ScratchContainer &ref_scratchBuffer, const KeyFunc &keyFunc)
 Sorts the elements in container by an unsigned 64-bit radix key (stable), reusing external scratch memory.
template<typename T, typename ScratchContainer, typename KeyFunc>
static void RadixSort (xiiArrayPtr< T > &ref_pArray, ScratchContainer &ref_scratchBuffer, const KeyFunc &keyFunc)
 Sorts the elements in the array by an unsigned 64-bit radix key (stable), reusing external scratch memory.

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

This class provides implementations of different sorting algorithms.

Member Function Documentation

◆ QuickSort()

template<typename Container, typename Comparer>
void xiiSorting::QuickSort ( Container & ref_container,
const Comparer & comparer = Comparer() )
static

Sorts the elements in container using a in-place quick sort implementation (not stable).

Copyright (c) Theophilus Eriata. All Rights Reserved.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Algorithm/Sorting.h
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Algorithm/Implementation/Sorting_inl.h