Trait sourmash::index::Index [−][src]
pub trait Index<'a> { type Item: Comparable<Self::Item>; fn insert(&mut self, node: Self::Item) -> Result<(), Error>; fn save<P: AsRef<Path>>(&self, path: P) -> Result<(), Error>; fn load<P: AsRef<Path>>(path: P) -> Result<(), Error>; fn signatures(&self) -> Vec<Self::Item>; fn signature_refs(&self) -> Vec<&Self::Item>; fn find<F>(
&self,
search_fn: F,
sig: &Self::Item,
threshold: f64
) -> Result<Vec<&Self::Item>, Error>
where
F: Fn(&dyn Comparable<Self::Item>, &Self::Item, f64) -> bool, { ... } fn search(
&self,
sig: &Self::Item,
threshold: f64,
containment: bool
) -> Result<Vec<&Self::Item>, Error> { ... } fn batch_insert(&mut self, nodes: Vec<Self::Item>) -> Result<(), Error> { ... } }
Associated Types
type Item: Comparable<Self::Item>
Required methods
fn signatures(&self) -> Vec<Self::Item>
fn signature_refs(&self) -> Vec<&Self::Item>
Provided methods
fn find<F>(
&self,
search_fn: F,
sig: &Self::Item,
threshold: f64
) -> Result<Vec<&Self::Item>, Error> where
F: Fn(&dyn Comparable<Self::Item>, &Self::Item, f64) -> bool,
Implementors
impl<'a, L> Index<'a> for LinearIndex<L> where
L: Clone + Comparable<L> + 'a,
SigStore<L>: From<L>,
impl<'a, N, L> Index<'a> for SBT<N, L> where
N: Comparable<N> + Comparable<L> + Update<N> + Debug + Default,
L: Comparable<L> + Update<N> + Clone + Debug + Default,
SBT<N, L>: FromFactory<N>,
SigStore<L>: From<L> + ReadData<L>,