sincerely
Singaporean
If you have not done so, read this full tutorial on how to use SGEXTN to build an application.
(no source file, everything inside header)
template ‹typename T, typename Comparator› class SGLSort;
part of SGEXTN module SG_Containers
static functions class for sorting array-like data
list of all including inherited members
preprocessor file inclusion directive: #include ‹SGLSort.h›
CMake target for BuildLah: SGEXTN::SG_Containers
see this link for more information about BuildLah
parent class: (none)
children classes: (none)
static void sort(T* start, T* end);
SGLSort provides a template based static functions class to sort array-like data structures. It works with any SGEXTN container data structure that provides pointerToData(). Specify the type of data to sort and the comparator to use as template arguments. This is a template based class with no separate source file.
SGLSort uses IntroSort, the same algorithm that the C++ Standard Template Library uses.
Sorts the data structure from start (inclusive) to end (exclusive), the comparator is provided using template arguments for SGLSort.
SGLSort::sort has a time complexity of O(n ln(n))
end being before start results in undefined behaviour.
If start and end are from different data structures, this function will cause undefined behaviour.
©2025 05524F.sg (Singapore)