Re: New feature



On 26 February 2013 02:26, Piotr Piastucki <leech miranda gmail com> wrote:
On 02/24/2013 09:46 PM, Kai Willadsen wrote:

I think that sounds good, and is probably the easiest approach. I was
actually thinking of modifying the algorithm to require the inclusion
of the snake passing through the sync point. While that kind of
approach should be workable in a naive LCS implementation, I can't see
how we'd shoehorn that in to our current code.

Since the current algorithm begins with common prefix/suffix matching
and each sync point would actually denote a star/end of a sub-block any
matching lines before/after the sync point should be recognized as a
common prefix/suffix by the algorithm.
So, in theory, the snake passing through the sync point should always be
included.

You're talking about your suggestion of doing an input split followed
by a double compare? In that case, yes, you should always get the sync
point included.

I was talking about a different option entirely of simply forcing the
algorithm through that point. Since the result should be almost
identical (bar some heuristic speed-ups maybe?), I think doing
whatever is easiest is the best plan.

cheers,
Kai


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]