Program Listing for File LongestCommonSubsequence.h
↰ Return to documentation for file (ADS/string/LongestCommonSubsequence.h)
/*--------------------------------------------------------------------------*/
/*-------------------- File LongestCommonSubsequence.h ---------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_LongestCommonSubsequence
#define __ADS_LongestCommonSubsequence
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include <algorithm>
#include "ADS/Contract.h"
#include <algorithm>
#include <cstddef>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
template< class S >
std::vector< std::vector< int > > lcsTable( const S & P , const S & T );
template< class S >
int lcsMemo( const S & P , const S & T , long * solved = nullptr );
template< class S >
S lcs( const S & P , const S & T );
template< class S >
std::vector< std::pair< char , typename S::value_type > > diff(
const S & P , const S & T );
template< class S >
std::tuple< std::size_t , std::size_t , std::size_t >
longestCommonSubstring( const S & P , const S & T );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/string/impl/LongestCommonSubsequence.tpp"
/*--------------------------------------------------------------------------*/
#endif /* LongestCommonSubsequence.h included */
/*--------------------------------------------------------------------------*/
/*------------------ End File LongestCommonSubsequence.h -------------------*/
/*--------------------------------------------------------------------------*/