JLibDiff
Class JRCSMyersAlgorithm
java.lang.Object
|
+--JLibDiff.JRCSMyersAlgorithm
- All Implemented Interfaces:
- DiffAlgorithm
- public class JRCSMyersAlgorithm
- extends java.lang.Object
- implements DiffAlgorithm
- Author:
- rmacgrogan
To change this generated comment edit the template variable "typecomment":
Window>Preferences>Java>Templates.
To enable and disable the creation of type comments go to
Window>Preferences>Java>Code Generation.
Method Summary |
JRCSMyersPathNode |
buildPath(java.lang.Object[] orig,
java.lang.Object[] rev)
Computes the minimum diffpath that expresses de differences
between the original and revised sequences, according
to Gene Myers differencing algorithm. |
java.util.Vector |
buildRevision(JRCSMyersPathNode path,
java.lang.Object[] orig,
java.lang.Object[] rev)
Constructs a Revision from a difference path. |
java.util.Vector |
makeDiff(java.lang.String[] A,
java.lang.String[] B)
|
void |
setEol(java.lang.String s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JRCSMyersAlgorithm
public JRCSMyersAlgorithm()
setEol
public void setEol(java.lang.String s)
- Specified by:
setEol
in interface DiffAlgorithm
- See Also:
DiffAlgorithm.setEol(String)
makeDiff
public java.util.Vector makeDiff(java.lang.String[] A,
java.lang.String[] B)
- Specified by:
makeDiff
in interface DiffAlgorithm
- See Also:
DiffAlgorithm.makeDiff(String[], String[])
buildPath
public JRCSMyersPathNode buildPath(java.lang.Object[] orig,
java.lang.Object[] rev)
- Computes the minimum diffpath that expresses de differences
between the original and revised sequences, according
to Gene Myers differencing algorithm.
- Parameters:
orig
- The original sequence.rev
- The revised sequence.
- Returns:
- A minimum
Path
accross the differences graph.
- Throws:
DifferentiationFailedException
- if a diff path could not be found.
buildRevision
public java.util.Vector buildRevision(JRCSMyersPathNode path,
java.lang.Object[] orig,
java.lang.Object[] rev)
- Constructs a
Revision
from a difference path.
- Parameters:
path
- The path.orig
- The original sequence.rev
- The revised sequence.
- Returns:
- A
Revision
script corresponding to the path.
- Throws:
DifferentiationFailedException
- if the Revision
could
not be built.
Copyright © 2003 Soucejammer project.