[−][src]Struct triple_accel::levenshtein::EditCosts
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
impl EditCosts
[src]
pub fn new(
mismatch_cost: u8,
gap_cost: u8,
start_gap_cost: u8,
transpose_cost: Option<u8>
) -> Self
[src]
mismatch_cost: u8,
gap_cost: u8,
start_gap_cost: u8,
transpose_cost: Option<u8>
) -> Self
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 Send for EditCosts
impl Sync for EditCosts
impl Unpin for EditCosts
impl UnwindSafe for EditCosts
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,