Skip to main content

Module histogram_diff

Module histogram_diff 

Source
Expand description

Histogram diff algorithm (Patience / low-occurrence anchor based diff).

Ported to match the behavior of JGit / java-diff-utils HistogramDiff. This algorithm selects elements with low occurrence counts as anchors to split sequences recursively, falling back to Myers’ algorithm when no low-occurrence anchors remain.

Structs§

HistogramDiff
Histogram diff algorithm implementation.
HistogramDiffFactory
Factory for creating HistogramDiff algorithm instances.

Constants§

DEFAULT_MAX_CHAIN_LENGTH
Default maximum occurrence count for an element to be considered as a pivot anchor.

Functions§

compute_diff
Computes the diff between two slices using HistogramDiff and default equality.
compute_diff_full
Full histogram diff entry point with workspace and listener support.
compute_diff_with
Computes the diff between two slices using HistogramDiff and a custom equalizer.