Struct Alignment

Source
pub struct Alignment<'a, M, T>
where M: Measure<T>, T: Eq,
{ /* private fields */ }
Expand description

Edit distance cost matrix.

Implementations§

Source§

impl<'a, M, T> Alignment<'a, M, T>
where M: Measure<T>, T: Eq,

Source

pub fn distance(&self) -> usize

Get the edit distance.

Source

pub fn edit_script(&self) -> Vec<IndexedOperation<M::Operation>>

Return the script of edit operations to rewrite the source sequence to the target sequence. If there are multiple possible edit scripts, this method will return one of the possible edit scripts. If you want to retrieve all possible edit scripts, use the edit_scripts method.

Source

pub fn edit_scripts(&self) -> HashSet<Vec<IndexedOperation<M::Operation>>>

Return all the edit scripts to rewrite the source sequence to the target sequence. If you want just one edit script, use the edit_script method instead.

Source

pub fn cost_matrix(&self) -> &Vec<Vec<usize>>

Get the cost matrix.

Source

pub fn seq_pair(&self) -> &SeqPair<'_, T>

Get the sequence pair associated with this cost matrix.

Auto Trait Implementations§

§

impl<'a, M, T> Freeze for Alignment<'a, M, T>

§

impl<'a, M, T> RefUnwindSafe for Alignment<'a, M, T>

§

impl<'a, M, T> Send for Alignment<'a, M, T>
where M: Sync, T: Sync,

§

impl<'a, M, T> Sync for Alignment<'a, M, T>
where M: Sync, T: Sync,

§

impl<'a, M, T> Unpin for Alignment<'a, M, T>

§

impl<'a, M, T> UnwindSafe for Alignment<'a, M, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.