[−][src]Trait math::iter::common_refinement_zip::CommonRefinementZip
Required methods
Loading content...Provided methods
fn common_refinement_zip(
self,
other: Self
) -> CommonRefinementZipped<B, Self, X, P, V>ⓘ
self,
other: Self
) -> CommonRefinementZipped<B, Self, X, P, V>ⓘ
Implementations on Foreign Types
impl<'a, V, B: Integer + Copy + ToPrimitive> CommonRefinementZip<B, (&'a ContiguousIntegerSet<B>, &'a V), ContiguousIntegerSet<B>, V> for Iter<'a, IntInterval<B>, V> where
B: 'a,
V: 'a + Clone,
[src]
B: 'a,
V: 'a + Clone,
Example
use analytic::{ interval::{traits::Interval, IntInterval}, iter::CommonRefinementZip, }; use std::collections::BTreeMap; let m1: BTreeMap<IntInterval<usize>, i32> = vec![(IntInterval::new(0, 5), 5), (IntInterval::new(8, 10), 2)] .into_iter() .collect(); let m2: BTreeMap<IntInterval<usize>, i32> = vec![(IntInterval::new(2, 4), 8), (IntInterval::new(12, 13), 9)] .into_iter() .collect(); let mut iter = m1.iter().common_refinement_zip(m2.iter()); assert_eq!( Some((IntInterval::new(0, 1), vec![Some(5), None])), iter.next() ); assert_eq!( Some((IntInterval::new(2, 4), vec![Some(5), Some(8)])), iter.next() ); assert_eq!( Some((IntInterval::new(5, 5), vec![Some(5), None])), iter.next() ); assert_eq!( Some((IntInterval::new(8, 10), vec![Some(2), None])), iter.next() ); assert_eq!( Some((IntInterval::new(12, 13), vec![None, Some(9)])), iter.next() ); assert_eq!(None, iter.next());
fn get_interval_value_extractor(
&self
) -> Box<dyn Fn(Self::Item) -> (IntInterval<B>, V)>
[src]
&self
) -> Box<dyn Fn(Self::Item) -> (IntInterval<B>, V)>
impl<'a, V, B: Integer + Copy + ToPrimitive> CommonRefinementZip<B, (ContiguousIntegerSet<B>, V), ContiguousIntegerSet<B>, V> for IntoIter<IntInterval<B>, V> where
B: 'a,
[src]
B: 'a,
fn get_interval_value_extractor(
&self
) -> Box<dyn Fn(Self::Item) -> (IntInterval<B>, V)>
[src]
&self
) -> Box<dyn Fn(Self::Item) -> (IntInterval<B>, V)>
Implementors
impl<I, V> CommonRefinementZip<i64, (ContiguousIntegerSet<i64>, V), ContiguousIntegerSet<i64>, V> for BinnedIntervalIter<I, V> where
I: Iterator,
V: Copy + Num + FromPrimitive + PartialOrd,
[src]
I: Iterator,
V: Copy + Num + FromPrimitive + PartialOrd,
fn get_interval_value_extractor(
&self
) -> Box<dyn Fn(Self::Item) -> (I64Interval, V)>
[src]
&self
) -> Box<dyn Fn(Self::Item) -> (I64Interval, V)>