elements_are_similar

Function elements_are_similar 

Source
pub fn elements_are_similar<'mem, 'facet>(
    peek_a: Peek<'mem, 'facet>,
    peek_b: Peek<'mem, 'facet>,
    threshold: f64,
) -> bool
Expand description

Check if two sequence elements should be paired based on structural similarity.

This is a convenience function for sequence diffing that returns true if the elements are similar enough to be shown as a modification rather than a removal+addition.

ยงArguments

  • peek_a - First element
  • peek_b - Second element
  • threshold - Minimum similarity score (0.0 to 1.0), recommended 0.5-0.7