public class MyersDiff extends java.lang.Object implements DiffAlgorithm
See the paper at http://www.cs.arizona.edu/people/gene/PAPERS/diff.ps
Delta,
Revision,
Diff| Constructor and Description |
|---|
MyersDiff()
Constructs an instance of the Myers differencing algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
static PathNode |
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.
|
static Revision |
buildRevision(PathNode path,
java.lang.Object[] orig,
java.lang.Object[] rev)
Constructs a
Revision from a difference path. |
Revision |
diff(java.lang.Object[] orig,
java.lang.Object[] rev)
Computes the difference between the original
sequence and the revised sequence and returns it
as a
Revision
object. |
public MyersDiff()
public Revision diff(java.lang.Object[] orig, java.lang.Object[] rev) throws DifferentiationFailedException
Revision
object.
The revision can be used to construct the revised sequence from the original sequence.
diff in interface DiffAlgorithmrev - the revised textDifferentiationFailedException - if the diff could not be computed.public static PathNode buildPath(java.lang.Object[] orig, java.lang.Object[] rev) throws DifferentiationFailedException
orig - The original sequence.rev - The revised sequence.Path accross the differences graph.DifferentiationFailedException - if a diff path could not be found.public static Revision buildRevision(PathNode path, java.lang.Object[] orig, java.lang.Object[] rev)
Revision from a difference path.path - The path.orig - The original sequence.rev - The revised sequence.Revision script corresponding to the path.DifferentiationFailedException - if a Revision could
not be built from the given path.Copyright 2002 the Apache Software Foundation
Copyright ? 1999-2001 Juancarlo A?ez, Caracas, Venezuela.
All rights reserved
. http://www.suigeneris.org/jrcs