Humm Makes me think...:)
Actually mathematical subsequences are defined as maps on a subset of N and have "holes"; for example consider u(2n) versus u(n). Still in the case of finite sequences (especially in the context of char strings) it seems *contiguous* would be a fair (even natural) requisite.
Looking at some implementations seems to indicate that the contiguous case is considered as the common useful case:
% steph@ape (/home/stephan/w/tp) % % perl -MString::LCSS -le 'print scalar String::LCSS::lcss(qw[xaxbcxdx + aybycyydy])' % steph@ape (/home/stephan/w/tp) % % perl -MString::LCSS -le 'print scalar String::LCSS::lcss(qw[xabcdxxx +xxx yyyabcdyyyyy])' abcd
I get the same with the recent String::LCSS_XS
cheers --stephan% steph@ape (/home/stephan/w/tp) % % perl -MString::LCSS_XS -le 'print scalar String::LCSS_XS::lcss(qw[xa +bcdxxxxxx yyyabcdyyyyy])' abcd
In reply to Re^6: Longest Common Subsequence Question
by sgt
in thread Longest Common Subsequence Question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |