AceSorting  0.1.0
Sorting algorithms for Arduino (Bubble Sort, Insertion Sort, Shell Sort, Comb Sort, Quick Sort)
Functions
shellSort.h File Reference
#include "swap.h"
Include dependency graph for shellSort.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
void ace_sorting::shellSortClassic (T data[], uint16_t n)
 Shell sort with gap size reduced by factor of 2 each iteration. More...
 
template<typename T >
void ace_sorting::shellSortKnuth (T data[], uint16_t n)
 Shell sort using gap size from Knuth. More...
 
template<typename T >
void ace_sorting::shellSortTokuda (T data[], const uint16_t n)
 Shell sort using gap sizes empirically determined by Tokuda. More...
 

Detailed Description

Shell sort with different gap algorithms.

Definition in file shellSort.h.

Function Documentation

◆ shellSortClassic()

template<typename T >
void ace_sorting::shellSortClassic ( data[],
uint16_t  n 
)

Shell sort with gap size reduced by factor of 2 each iteration.

Average complexity: Between O(n^1.3) to O(n^1.5) See https://en.wikipedia.org/wiki/Shellsort

Template Parameters
Ttype of data to sort

Definition at line 46 of file shellSort.h.

◆ shellSortKnuth()

template<typename T >
void ace_sorting::shellSortKnuth ( data[],
uint16_t  n 
)

Shell sort using gap size from Knuth.

Average complexity: Between O(n^1.3) to O(n^1.5)

Template Parameters
Ttype of data to sort

Definition at line 78 of file shellSort.h.

◆ shellSortTokuda()

template<typename T >
void ace_sorting::shellSortTokuda ( data[],
const uint16_t  n 
)

Shell sort using gap sizes empirically determined by Tokuda.

See https://en.wikipedia.org/wiki/Shellsort and https://oeis.org/A108870. Average complexity: Between O(n^1.3) to O(n^1.5)

Template Parameters
Ttype of data to sort

Definition at line 119 of file shellSort.h.