Skip to main content

CompressionSpec

Trait CompressionSpec 

Source
pub trait CompressionSpec<D> {
    // Required methods
    fn reduce(&self, path_object: D, kmer_object: &D) -> D;
    fn join_test(&self, d1: &D, d2: &D) -> bool;
}
Expand description

Customize the path-compression process. Implementing this trait lets the user control how the per-kmer data (of type D) is summarized into a per-path summary data (of type DS). It also let’s the user introduce new breaks into paths by inspecting in the per-kmer data of a proposed with join_test_kmer function.

Required Methods§

Source

fn reduce(&self, path_object: D, kmer_object: &D) -> D

combine the data of two nodes

Source

fn join_test(&self, d1: &D, d2: &D) -> bool

check if the data of two nodes can be combined

Implementors§

Source§

impl<D> CompressionSpec<D> for ScmapCompress<D>
where D: Debug + PartialEq,

Source§

impl<D, F1, F2> CompressionSpec<D> for CheckCompress<D, F1, F2>
where for<'r> F1: Fn(D, &'r D) -> D, for<'r> F2: Fn(&'r D, &'r D) -> bool,

Source§

impl<D, F> CompressionSpec<D> for SimpleCompress<D, F>
where for<'r> F: Fn(D, &'r D) -> D,