Struct triple_accel::levenshtein::EditCosts [−][src]
pub struct EditCosts { /* fields omitted */ }
Expand description
A struct holding the edit costs for mismatches, gaps, and possibly transpositions.
This should be used as a parameter for Levenshtein distance or search routines.
Implementations
Create a new EditCosts
struct, checking for whether the specified costs are valid.
Arguments
mismatch_cost
- cost of a mismatch edit, which must be positivegap_cost
- cost of a gap, which must be positivestart_gap_cost
- additional cost of starting a gap, for affine gap costs; this can be zero for linear gap coststranspose_cost
- cost of a transpose, which must be cheaper than doing the equivalent operation with mismatches and gaps
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EditCosts
impl UnwindSafe for EditCosts
Blanket Implementations
Mutably borrows from an owned value. Read more