The result of running Myers' diff algorithm against two IndexedSeq instances. Provides the basic deletes and inserts operations required to transform base into target as well as higher-level logic that refines the basic result (like detecting "move" and "replace" ops).
The result of running Myers' diff algorithm against two IndexedSeq instances. Provides the basic deletes and inserts operations required to transform base into target as well as higher-level logic that refines the basic result (like detecting "move" and "replace" ops).
Instances are created with Diff(base, target).
- Companion
- object
Value members
Abstract methods
Identifies all operation types (Diff.Op.Delete, Diff.Op.Insert, Diff.Op.Move and Diff.Op.Replace)
and returns them sorted by baseIx.
Identifies all operation types (Diff.Op.Delete, Diff.Op.Insert, Diff.Op.Move and Diff.Op.Replace)
and returns them sorted by baseIx.
The difference to delInsMovOpsSorted is that deletes and inserts targeting the same baseIx are combined into
Diff.Op.Replace instances.
Creates a bidirectional index mapping between base and target, without taking moves into account. This means that elements that have been moved will not have their indices mapped. They simply appear as "not present" in the other sequence.
Creates a bidirectional index mapping between base and target, without taking moves into account. This means that elements that have been moved will not have their indices mapped. They simply appear as "not present" in the other sequence.
The benefit over bimap is the reduced overhead since the O(N^^2) move detection doesn't have to be performed.
Segments the inputs into a sequence of chunks representing the diff in a alternative form, that is sometimes better suited to the task at hand than allOps and friends.
Segments the inputs into a sequence of chunks representing the diff in a alternative form, that is sometimes better suited to the task at hand than allOps and friends.
Returns an optimal number of the Diff.Op.DelInsMov operations required to transform base into target. Spends an additional O(N^^2) time on finding Diff.Op.Move operations.
Returns an optimal number of the Diff.Op.DelInsMov operations required to transform base into target. Spends an additional O(N^^2) time on finding Diff.Op.Move operations.
Note that a move is only identified as such if a Diff.Op.Delete has a directly corresponding Diff.Op.Insert. There is no further search for moves in subsets of individual deletes or inserts. Or said differently: Deletes and Inserts are never split to identify potential moves between parts of them.
The Diff.Op.Delete operations that, together with inserts, are required to transform base into target.
The Diff.Op.Delete operations that, together with inserts, are required to transform base into target.
The Diff.Op.Insert operations that, together with deletes, are required to transform base into target.
The Diff.Op.Insert operations that, together with deletes, are required to transform base into target.