org.openoffice.xmerge.merger.diff
Class CharArrayLCSAlgorithm
java.lang.Object
|
+--org.openoffice.xmerge.merger.diff.CharArrayLCSAlgorithm
- public class CharArrayLCSAlgorithm
- extends java.lang.Object
This is an implementations of DiffAlgorithm
interface
which will difference char arrays.
It also use Longest Common Subsequence (LCS). The algorithm is based
on the book "Introduction to Algorithms" by Thomas H.Cormen,
Charles E.Leiserson, and Ronald L.Riverst (MIT Press 1990) page 314.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CharArrayLCSAlgorithm
public CharArrayLCSAlgorithm()
computeDiffs
public Difference[] computeDiffs(char[] orgSeq,
char[] modSeq)
- Return an
Difference
array. This method finds out
the difference between two sequences.
- Parameters:
orgSeq
- The original sequence.modSeq
- The modified (or changed) sequence to
compare against the origial.- Returns:
- A
Difference
array.
Copyright © 2002 OpenOffice.org