diff --git a/src/algorithms/lcs.rs b/src/algorithms/lcs.rs index d70b2e3..bbcf112 100644 --- a/src/algorithms/lcs.rs +++ b/src/algorithms/lcs.rs @@ -293,6 +293,10 @@ fn test_bad_range_regression() { ); } +/// LCS diff algorithm with f32 epsilon comparison. +/// +/// Diff `old`, between indices `old_range` and `new` between indices `new_range`. +/// Values are considered equal if their absolute difference is within `epsilon`. pub fn diff_fp_deadline( d: &mut D, old: &[f32], @@ -308,6 +312,10 @@ where crate::algorithms::myers::diff_fp_deadline(d, old, old_range, new, new_range, epsilon, deadline) } +/// LCS diff algorithm with f64 epsilon comparison. +/// +/// Diff `old`, between indices `old_range` and `new` between indices `new_range`. +/// Values are considered equal if their absolute difference is within `epsilon`. pub fn diff_fp_f64_deadline( d: &mut D, old: &[f64], diff --git a/src/algorithms/myers.rs b/src/algorithms/myers.rs index e660319..72405e4 100644 --- a/src/algorithms/myers.rs +++ b/src/algorithms/myers.rs @@ -445,6 +445,9 @@ fn test_finish_called() { } /// Myers' diff algorithm with f32 epsilon comparison. +/// +/// Diff `old`, between indices `old_range` and `new` between indices `new_range`. +/// Values are considered equal if their absolute difference is within `epsilon`. pub fn diff_fp_deadline( d: &mut D, old: &[f32], @@ -467,6 +470,9 @@ where } /// Myers' diff algorithm with f64 epsilon comparison. +/// +/// Diff `old`, between indices `old_range` and `new` between indices `new_range`. +/// Values are considered equal if their absolute difference is within `epsilon`. pub fn diff_fp_f64_deadline( d: &mut D, old: &[f64], diff --git a/src/algorithms/patience.rs b/src/algorithms/patience.rs index b687376..ec5f1bb 100644 --- a/src/algorithms/patience.rs +++ b/src/algorithms/patience.rs @@ -197,6 +197,10 @@ fn test_finish_called() { assert!(d.0); } +/// Patience diff algorithm with f32 epsilon comparison. +/// +/// Diff `old`, between indices `old_range` and `new` between indices `new_range`. +/// Values are considered equal if their absolute difference is within `epsilon`. pub fn diff_fp_deadline( d: &mut D, old: &[f32], @@ -212,6 +216,10 @@ where crate::algorithms::myers::diff_fp_deadline(d, old, old_range, new, new_range, epsilon, deadline) } +/// Patience diff algorithm with f64 epsilon comparison. +/// +/// Diff `old`, between indices `old_range` and `new` between indices `new_range`. +/// Values are considered equal if their absolute difference is within `epsilon`. pub fn diff_fp_f64_deadline( d: &mut D, old: &[f64],