Program Listing for File InterpolationSearch.h

↰ Return to documentation for file (ADS/search/InterpolationSearch.h)

/*--------------------------------------------------------------------------*/
/*----------------------- File InterpolationSearch.h -----------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef __ADS_InterpolationSearch
 #define __ADS_InterpolationSearch
                      /* self-identification: #endif constant */

/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/

#include "ADS/Contract.h"

#include <algorithm>
#include <vector>

/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/

namespace ADS {

template< class T , class F >
long interpolationSearch( const std::vector< T > & A , const T & v ,
                          F && trace );

template< class T >
long interpolationSearch( const std::vector< T > & A , const T & v );

/*--------------------------------------------------------------------------*/

}  // end( namespace ADS )

/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/

#include "ADS/search/impl/InterpolationSearch.tpp"

/*--------------------------------------------------------------------------*/

#endif  /* InterpolationSearch.h included */

/*--------------------------------------------------------------------------*/
/*--------------------- End File InterpolationSearch.h ---------------------*/
/*--------------------------------------------------------------------------*/