|
Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Implementation of the Wave sort algorithm. More...
#include <algorithm>#include <cassert>#include <iostream>#include <vector>Namespaces | |
| namespace | sorting |
| for working with vectors | |
| namespace | wave_sort |
| Functions for the Wave sort implementation. | |
Functions | |
| template<typename T > | |
| std::vector< T > | sorting::wave_sort::waveSort (const std::vector< T > &in_arr, int64_t n) |
| The main function implements that implements the Wave Sort algorithm. More... | |
| static void | test () |
| Self-test implementations. More... | |
| int | main () |
| Main function. More... | |
Implementation of the Wave sort algorithm.
Wave Sort is a sorting algorithm that works in \(O(nlogn)\) time assuming the sort function used works in \(O(nlogn)\) time.
| int main | ( | void | ) |
|
static |
Self-test implementations.
| std::vector< T > sorting::wave_sort::waveSort | ( | const std::vector< T > & | in_arr, |
| int64_t | n | ||
| ) |
The main function implements that implements the Wave Sort algorithm.
| T | type of array |
| in_arr | array to be sorted |