|
|
| The stupid question is the question not asked | |
| PerlMonks |
Re: Seeking algorithm for finding common continous sub-patternsby tachyon (Chancellor) |
| on Dec 03, 2004 at 04:33 UTC ( [id://412073]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Maybe this will be fast enough for you. Maybe you need to be a bit more specific with your spec. This will not scale very well. The 27 element data set consumes 120 loops in the generation phase and 34 in the output phase for a total of 154. It is roughly O(n^2) but it is quite data dependent. I wrote Algorithm::LCSS which is based on Algorithm::Diff and may be a better option depending on the real task. The problem with that approach is that it is a one to one comparison not many to many which is what you seem to want.
cheers tachyon
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||