Program Listing for File CountingSort.h
↰ Return to documentation for file (ADS/sort/CountingSort.h)
/*--------------------------------------------------------------------------*/
/*-------------------------- File CountingSort.h ---------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_CountingSort
#define __ADS_CountingSort
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/Contract.h"
#include "ADS/sort/Sorted.h"
#include <algorithm>
#include <cstddef>
#include <functional>
#include <stdexcept>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
template< class T >
void countingSort( std::vector< T > & A , std::size_t k );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/sort/impl/CountingSort.tpp"
/*--------------------------------------------------------------------------*/
#endif /* CountingSort.h included */
/*--------------------------------------------------------------------------*/
/*------------------------ End File CountingSort.h -------------------------*/
/*--------------------------------------------------------------------------*/