#include <sort.h>
Public Member Functions | |
| Sorter () | |
| The constructor. | |
| virtual | ~Sorter () |
| The destructor. | |
| virtual int | Sort (T *_array, size_t _size)=0 |
| The abstract sort function. | |
| virtual void | Swap (T *_array, size_t _first, size_t _second) |
| The swap function. | |
| virtual int Sort | ( | T * | _array, | |
| size_t | _size | |||
| ) | [pure virtual] |
The abstract sort function.
Does nothing, and cannot be called (abstract).
| _array | The array to sort. | |
| _size | The size of the array to sort. |
Implemented in BubbleSort< T >, CombSort< T >, HeapSort< T >, InsertionSort< T >, QuickSort< T >, and ShellSort< T >.
| virtual void Swap | ( | T * | _array, | |
| size_t | _first, | |||
| size_t | _second | |||
| ) | [inline, virtual] |
The swap function.
Will swap two items in an array.
| _array | The array to swap items in. | |
| _first | The first item to swap. | |
| _second | The second item to swap. |
1.5.8