lcs_by_score

Function lcs_by_score 

Source
pub fn lcs_by_score<T>(
    old: &[T],
    new: &[T],
    score_fn: impl FnMut(&T, &T) -> f64,
) -> Vec<DiffResult>
Expand description

Compare two slices and return optimal matching based on scores. The score_fn closure calculates the match score (0.0 to 1.0).