DeepDiffs.jl
DeepDiffs.jl copied to clipboard
Needs heuristics for when to consider vector items "changed"
Currently we don't support the concept of "changed" items in a vector, just added and removed. This makes sense for e.g. deepdiff([1, 2, 3], [1, 4, 3])
, but for vectors of more complicated objects it would be nice to recurse down to recognize items that change.
Probably the right way to solve it is to do the following for composite objects:
- change the longest subsequence algorithm to use a similarity cost function rather than binary match/no-match
- When walking through the lowest-cost path, for each vertical or horizontal run, pick the closest item to be the one that "changed" and treat the others as "added" or "removed". We could also have some sort of cut-off where really dissimilar objects are treated as an addition/removal rather than a change