ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ListSort.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/*---------------------------- File ListSort.h -----------------------------*/
3/*--------------------------------------------------------------------------*/
44/*--------------------------------------------------------------------------*/
45/*----------------------------- DEFINITIONS --------------------------------*/
46/*--------------------------------------------------------------------------*/
47
48#ifndef __ADS_ListSort
49 #define __ADS_ListSort
50/* self-identification: #endif constant */
51
52/*--------------------------------------------------------------------------*/
53/*------------------------------ INCLUDES ----------------------------------*/
54/*--------------------------------------------------------------------------*/
55
56#include "ADS/Contract.h"
57#include "ADS/sequence/List.h"
58#include "ADS/sort/RadixSort.h"
59
60#include <cstddef>
61#include <functional>
62#include <type_traits>
63#include <utility>
64#include <vector>
65
66/*--------------------------------------------------------------------------*/
67/*--------------------------- NAMESPACE ------------------------------------*/
68/*--------------------------------------------------------------------------*/
69
70namespace ADS
71{
72
107template< class T , bool P , class C = std::less<> >
108void listSort( List< T , P > & L , C less = C() );
109
110} // end( namespace ADS )
111
112/*--------------------------------------------------------------------------*/
113/*-------------------------- IMPLEMENTATION --------------------------------*/
114/*--------------------------------------------------------------------------*/
115
116#include "ADS/sequence/impl/ListSort.tpp"
117
118/*--------------------------------------------------------------------------*/
119
120#endif /* ListSort.h included */
121
122/*--------------------------------------------------------------------------*/
123/*-------------------------- End File ListSort.h ---------------------------*/
124/*--------------------------------------------------------------------------*/
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
The LIST of the book: a SEQUENCE [see ADT.h] realized as a bidirectional circular list of cells with ...
The sorts by the digits of the keys, beyond the book (which has Counting Sort and Pigeonhole Sort,...
a SEQUENCE realized as a bidirectional circular list with a sentinel, its cells from a pool if Pooled
Definition List.h:118
void listSort(List< T, P > &L, C less=C())
the list sorted by relinking its cells, stable
Definition ADT.h:96