Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
|
#include <lcs.h>
Static Public Member Functions | |
static int | length (const T *seq1, int len1, const T *seq2, int len2) |
static int | subsequence (const T *seq1, int len1, const T *seq2, int len2, std::vector< T > *out) |
Trivial dynamic programming computation of LCS
static int strings::lcs::LCS< T >::length | ( | const T * | seq1, |
int | len1, | ||
const T * | seq2, | ||
int | len2 | ||
) | [inline, static] |
Compute the length of the longest common subsequence of two sequences.
Running time is O(nm) , memory is O(n+m)
static int strings::lcs::LCS< T >::subsequence | ( | const T * | seq1, |
int | len1, | ||
const T * | seq2, | ||
int | len2, | ||
std::vector< T > * | out | ||
) | [inline, static] |