Program Listing for File ApproximateMatching.h
↰ Return to documentation for file (ADS/string/ApproximateMatching.h)
/*--------------------------------------------------------------------------*/
/*----------------------- File ApproximateMatching.h -----------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_ApproximateMatching
#define __ADS_ApproximateMatching
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include <algorithm>
#include "ADS/Contract.h"
#include <cstddef>
#include <string>
#include <utility>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
using Table = std::vector< std::vector< int > >;
template< class S >
Table matchingTable( const S & P , const S & T , bool edit = false );
template< class S >
std::pair< long , int > stringMatching( const S & P , const S & T );
template< class S >
std::size_t occurrence( const Table & DP , const S & P , const S & T ,
std::size_t j );
template< class S >
int stringMatchingSingleRow( const S & P , const S & T );
template< class S >
int editDistance( const S & P , const S & T );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/string/impl/ApproximateMatching.tpp"
/*--------------------------------------------------------------------------*/
#endif /* ApproximateMatching.h included */
/*--------------------------------------------------------------------------*/
/*--------------------- End File ApproximateMatching.h ---------------------*/
/*--------------------------------------------------------------------------*/