Struct rdiff::string_diff::EditDistance
[−]
[src]
pub struct EditDistance;
Used as the classiscal definition of edit distance.
That is:
- Insert is cost -1
- Delete is cost -1
- Substitution is cost -2 (an insert + a delete)
- Matching is cost 0
Trait Implementations
impl OperationScore for EditDistance
[src]
fn insert_score(&self, _: char) -> i32
The score for inserting character c
into the string
fn delete_score(&self, _: char) -> i32
The score for deleting character c
from the string
fn substitution_score(&self, _: char, _: char) -> i32
The score for replacing character old
with character new
fn match_score(&self, _: char) -> i32
The score for when a character is one string matches the character in the other string