Struct bio::pattern_matching::ukkonen::Ukkonen
source · pub struct Ukkonen<F>where
F: Fn(u8, u8) -> u32,{ /* private fields */ }
Expand description
Ukkonens algorithm.
Implementations§
source§impl<F> Ukkonen<F>where
F: Fn(u8, u8) -> u32,
impl<F> Ukkonen<F>where F: Fn(u8, u8) -> u32,
sourcepub fn with_capacity(m: usize, cost: F) -> Self
pub fn with_capacity(m: usize, cost: F) -> Self
Initialize algorithm with given capacity and cost function.
sourcepub fn find_all_end<'a, C, T>(
&'a mut self,
pattern: TextSlice<'a>,
text: T,
k: usize
) -> Matches<'_, F, C, T::IntoIter> ⓘwhere
C: Borrow<u8>,
T: IntoIterator<Item = C>,
pub fn find_all_end<'a, C, T>( &'a mut self, pattern: TextSlice<'a>, text: T, k: usize ) -> Matches<'_, F, C, T::IntoIter> ⓘwhere C: Borrow<u8>, T: IntoIterator<Item = C>,
Find all matches between pattern and text with up to k errors. Matches are returned as an iterator over pairs of end position and distance.
Trait Implementations§
source§impl<'de, F> Deserialize<'de> for Ukkonen<F>where
F: Fn(u8, u8) -> u32 + Deserialize<'de>,
impl<'de, F> Deserialize<'de> for Ukkonen<F>where F: Fn(u8, u8) -> u32 + Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<F> Ord for Ukkonen<F>where
F: Fn(u8, u8) -> u32 + Ord,
impl<F> Ord for Ukkonen<F>where F: Fn(u8, u8) -> u32 + Ord,
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<F> PartialEq<Ukkonen<F>> for Ukkonen<F>where
F: Fn(u8, u8) -> u32 + PartialEq,
impl<F> PartialEq<Ukkonen<F>> for Ukkonen<F>where F: Fn(u8, u8) -> u32 + PartialEq,
source§impl<F> PartialOrd<Ukkonen<F>> for Ukkonen<F>where
F: Fn(u8, u8) -> u32 + PartialOrd,
impl<F> PartialOrd<Ukkonen<F>> for Ukkonen<F>where F: Fn(u8, u8) -> u32 + PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<F> Eq for Ukkonen<F>where F: Fn(u8, u8) -> u32 + Eq,
impl<F> StructuralEq for Ukkonen<F>where F: Fn(u8, u8) -> u32,
impl<F> StructuralPartialEq for Ukkonen<F>where F: Fn(u8, u8) -> u32,
Auto Trait Implementations§
impl<F> RefUnwindSafe for Ukkonen<F>where F: RefUnwindSafe,
impl<F> Send for Ukkonen<F>where F: Send,
impl<F> Sync for Ukkonen<F>where F: Sync,
impl<F> Unpin for Ukkonen<F>where F: Unpin,
impl<F> UnwindSafe for Ukkonen<F>where F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.