Module Patience_diff_lib.Plain_diff
Basic Myers diff algorithm, translated from GNU diff. *
val iter_matches : ?cutoff:int -> f:((int * int) -> unit) -> hashable:'a Base.Hashtbl.Key.t -> 'a array -> 'a array -> unititer_matches ?cutoff ~f ~hashable a bdiffs the arraysaandb(as in /usr/bin/diff), and callsfon each element of the longest common subsequence in increasing order. The arguments offare the indices inaandb, respectively, of that element.The
cutoffis an upper bound on the minimum edit distance betweenaandb. Whencutoffis exceeded,iter_matchesreturns a correct, but not necessarily minimal diff. It defaults to aboutsqrt (Array.length a + Array.length b).