Program Listing for File PatienceSort.h
↰ Return to documentation for file (ADS/sort/PatienceSort.h)
/*--------------------------------------------------------------------------*/
/*-------------------------- File PatienceSort.h ---------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_PatienceSort
#define __ADS_PatienceSort
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/Contract.h"
#include "ADS/priority/DaryHeap.h"
#include "ADS/sort/Sorted.h"
#include <algorithm>
#include <cstddef>
#include <functional>
#include <utility>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
template< class T , class C = std::less<> >
void patienceSort( std::vector< T > & A , C less = C() ,
std::size_t * piles = nullptr );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/sort/impl/PatienceSort.tpp"
/*--------------------------------------------------------------------------*/
#endif /* PatienceSort.h included */
/*--------------------------------------------------------------------------*/
/*------------------------ End File PatienceSort.h -------------------------*/
/*--------------------------------------------------------------------------*/