diff options
author | Dan Davison <dandavison7@gmail.com> | 2019-08-07 10:03:08 -0700 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2019-08-07 10:03:08 -0700 |
commit | 9034d0ecb8aeabfeac288adf5e4f5f4ed10974e0 (patch) | |
tree | cccfd09cd7e6fed9295f54c800bda3e63b3144b9 /src/align.rs | |
parent | 64001cfbd1543fe0bc8de45e7670ddc46c7d8385 (diff) |
Compute distance in annotation routine
Diffstat (limited to 'src/align.rs')
-rw-r--r-- | src/align.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/align.rs b/src/align.rs index 9d4aaf97..bd6aa834 100644 --- a/src/align.rs +++ b/src/align.rs @@ -124,11 +124,13 @@ impl<'a> Alignment<'a> { /// (total length of edits) / (total length of longer string) /// /// where length is measured in number of unicode grapheme clusters. + #[allow(dead_code)] pub fn distance(&self) -> f64 { let (numer, denom) = self.distance_parts(); (numer as f64) / (denom as f64) } + #[allow(dead_code)] pub fn distance_parts(&self) -> (usize, usize) { let (mut numer, mut denom) = (0, 0); for op in self.operations() { |