[][src]Struct triple_accel::levenshtein::EditCosts

pub struct EditCosts { /* fields omitted */ }

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]

Create a new EditCosts struct, checking for whether the specified costs are valid.

Arguments

  • mismatch_cost - cost of a mismatch edit, which must be positive
  • gap_cost - cost of a gap, which must be positive
  • start_gap_cost - additional cost of starting a gap, for affine gap costs; this can be zero for linear gap costs
  • transpose_cost - cost of a transpose, which must be cheaper than doing the equivalent operation with mismatches and gaps

Trait Implementations

impl Clone for EditCosts[src]

impl Copy for EditCosts[src]

impl Debug for EditCosts[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.