pub trait IntervalSetOps {
// Required methods
fn setdiff(&self, other: &RegionSet) -> RegionSet;
fn intersect(&self, other: &RegionSet) -> RegionSet;
fn jaccard(&self, other: &RegionSet) -> f64;
fn coverage(&self, other: &RegionSet) -> f64;
fn overlap_coefficient(&self, other: &RegionSet) -> f64;
fn closest(&self, other: &RegionSet) -> Vec<(usize, usize, i64)>;
}Expand description
Two-set interval operations on genomic region sets.
Provides set algebra (setdiff, intersect) and similarity metrics (jaccard, coverage, overlap_coefficient). Implementations may use sweep-line or index-based algorithms.
Required Methods§
Sourcefn setdiff(&self, other: &RegionSet) -> RegionSet
fn setdiff(&self, other: &RegionSet) -> RegionSet
Set difference: remove portions of self that overlap with other.
Sourcefn intersect(&self, other: &RegionSet) -> RegionSet
fn intersect(&self, other: &RegionSet) -> RegionSet
Range-level intersection: positions covered by both sets.
Sourcefn jaccard(&self, other: &RegionSet) -> f64
fn jaccard(&self, other: &RegionSet) -> f64
Nucleotide-level Jaccard similarity: |intersection| / |union|.
Sourcefn overlap_coefficient(&self, other: &RegionSet) -> f64
fn overlap_coefficient(&self, other: &RegionSet) -> f64
Overlap coefficient: |intersection| / min(|self|, |other|).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".