diff --git a/Cargo.lock b/Cargo.lock index a3da8e1..4b05b15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,7 +65,7 @@ dependencies = [ [[package]] name = "mbf_nested_intervals" -version = "0.3.0" +version = "0.3.1" dependencies = [ "nested_intervals", "pyo3", diff --git a/Cargo.toml b/Cargo.toml index f76a805..312c438 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mbf_nested_intervals" -version = "0.3.0" +version = "0.3.1" authors = ["Florian Finkernagel "] edition = "2018" diff --git a/mbf_nested_intervals/__init__.py b/mbf_nested_intervals/__init__.py index a8714d5..c7680ae 100644 --- a/mbf_nested_intervals/__init__.py +++ b/mbf_nested_intervals/__init__.py @@ -3,7 +3,7 @@ import pandas as pd import itertools -__version__ = "0.3.0" +__version__ = "0.3.1" def _df_to_tup(df): diff --git a/setup.cfg b/setup.cfg index 98c95da..f8f3e3c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [metadata] name = mbf_nested_intervals description = wrapper around https://crates.io/crates/nested_intervals -version = 0.3.0 +version = 0.3.1 author = Florian Finkernagel author-email = finkernagel@imt.uni-marburg.de license = mit diff --git a/src/lib.rs b/src/lib.rs index 6c65689..f574ebb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -412,6 +412,16 @@ impl PyIntervalSet { let ivs: Vec<_> = other.iter().map(|x| &x.inner).collect(); return_interval_set(py, self.inner.filter_to_overlapping_k_others(&ivs, max_k)) } + + pub fn filter_to_overlapping_and_split( + &mut self, + py: Python, + other: &PyIntervalSet, + ) -> PyResult> { + return_interval_set(py, self.inner.filter_to_overlapping_and_split(&other.inner)) + } + + } /// Wrapper around nested intervals