Struct hirschberg::Output

source ·
pub struct Output<'a, T, U> { /* private fields */ }
Expand description

Output from the Hirschberg algorithm containing an optimal global alignment and distance between two sequences.

Implementations§

source§

impl<'a, T, U> Output<'a, T, U>

source

pub fn alignment(&self) -> &[(Option<&'a T>, Option<&'a U>)]

Returns a slice of the optimal alignment. Each item is a tuple containing an element from sequence a or gap (indicated by None) at position 0, and an element from sequence b or gap at position 1. The ordering of the original sequences a and b is preserved.

source

pub fn score(&self) -> i32

Returns the score of the alignment.

Trait Implementations§

source§

impl<'a, T: Debug, U: Debug> Debug for Output<'a, T, U>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: PartialEq, U: PartialEq> PartialEq for Output<'a, T, U>

source§

fn eq(&self, other: &Output<'a, T, U>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a, T: Eq, U: Eq> Eq for Output<'a, T, U>

source§

impl<'a, T, U> StructuralEq for Output<'a, T, U>

source§

impl<'a, T, U> StructuralPartialEq for Output<'a, T, U>

Auto Trait Implementations§

§

impl<'a, T, U> RefUnwindSafe for Output<'a, T, U>where T: RefUnwindSafe, U: RefUnwindSafe,

§

impl<'a, T, U> Send for Output<'a, T, U>where T: Sync, U: Sync,

§

impl<'a, T, U> Sync for Output<'a, T, U>where T: Sync, U: Sync,

§

impl<'a, T, U> Unpin for Output<'a, T, U>

§

impl<'a, T, U> UnwindSafe for Output<'a, T, U>where T: RefUnwindSafe, U: RefUnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.