[ 
https://issues.apache.org/jira/browse/COLLECTIONS-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13644027#comment-13644027
 ] 

Thomas Neidhart commented on COLLECTIONS-404:
---------------------------------------------

After some thinking, I would like to do the following changes:

 * move to o.a.c.collections4.sequence package (it does not implement 
Comparator, so it is not really a good fit for comparators.sequence imho)
 * hide the xxxCommand implementations as they are not visible to the user via 
the API
 * support command coalescing, e.g. subsequent keep commands could be merged to 
a single one
 * add a SequenceUtil class that provides certain helpers for common things 
like getting the longest common subsequence of two lists
 * hide Snake inside the SequencesComparator, as it is an implementation detail
 * add a CharSequenceWrapper that wraps a CharSequence as List
 * provide util methods for diff and edit script formatter (very easy to do 
with the visitor pattern, I did already implement these)
                
> Adding an implementation of Eugene Myers difference algorithm
> -------------------------------------------------------------
>
>                 Key: COLLECTIONS-404
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-404
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Collection
>    Affects Versions: 3.2.1
>         Environment: all
>            Reporter: Luc Maisonobe
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: commons-collections-difference.patch, 
> commons-collections-difference-v2.patch, comparator.zip
>
>
> The difference algorithm aims at comparing two sequences of objects and 
> return an "edit script" which represents how one can transform the first 
> sequence into the second sequence. The script describes the various insert 
> object, delete object and keep object commands. The script is guaranteed to 
> be the shortest possible in terms of number of commands.
> From the script, one can either extract longest common sub-sequences (i.e. 
> how similar the sequences are) or on the contrary the needed changes (i.e. 
> how different the sequences are).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to