Implements the Myers diff algorithm.
Myers, Eugene W. "An O (ND) difference algorithm and its variations." Algorithmica 1.1 (1986): 251-266.
| Methods | ||
|---|---|---|
public
|
__construct(callable $isEqual)
|
# |
public
|
diff(array $old, array $new): DiffElem[]
|
# |
public
|
diffWithReplacements(array $old, array $new): DiffElem[]
|
# |
private
|
calculateTrace(array $a, array $b)
|
# |
private
|
extractDiff(array $trace, int $x, int $y, array $a, array $b)
|
# |
private
|
coalesceReplacements(DiffElem[] $diff): DiffElem[]
|
# |
| Properties | |||
|---|---|---|---|
private
|
|
$isEqual
|
# |