pub struct SplitIters<I> {
pub boundaries: Box<[usize]>,
pub iters: Box<[I]>,
}Expand description
A structure holding partition iterators and their boundaries.
This type holds a list of iterators and a list of boundaries, one more than the number of iterators. The implied semantics is that each iterator returns (labelled) pairs of nodes, and that the first element of each pair sits between the boundaries associated with the iterator.
This structures is returned by ParSortPairs and ParSortIters and can
easily be converted into lenders for use with
BvCompConfig::par_comp_lenders
using a convenient implementation of the From trait.
Note that it sufficient to write let lenders: Vec<_> = split_iters.into()
to perform the conversion. Type inference might not work properly if the
call is embedded in a larger expression, in which case an explicit type
annotation might be necessary.
Fields§
§boundaries: Box<[usize]>§iters: Box<[I]>Implementations§
Trait Implementations§
Source§impl<I: Iterator<Item = (usize, usize)> + Send + Sync, IT: IntoIterator<Item = (usize, usize), IntoIter = I>> From<SplitIters<IT>> for Vec<LeftIterator<NodeLabels<(), Map<I, fn((usize, usize)) -> ((usize, usize), ())>>>>
Conversion of a SplitIters of iterators on unlabeled pairs into a
sequence of pairs of starting points and associated lenders.
impl<I: Iterator<Item = (usize, usize)> + Send + Sync, IT: IntoIterator<Item = (usize, usize), IntoIter = I>> From<SplitIters<IT>> for Vec<LeftIterator<NodeLabels<(), Map<I, fn((usize, usize)) -> ((usize, usize), ())>>>>
Conversion of a SplitIters of iterators on unlabeled pairs into a
sequence of pairs of starting points and associated lenders.
This is useful for converting the output of sorting utilities like
ParSortPairs or ParSortIters into a form suitable for
BvCompConfig::par_comp_lenders
when working with unlabeled graphs.
The pairs (src, dst) are automatically converted to labeled form with unit
labels, and the resulting lenders are wrapped with
LeftIterator to project out just the
successor nodes.
Note that it sufficient to write let lenders: Vec<_> = split_iters.into()
to perform the conversion. Type inference might not work properly if the
call is embedded in a larger expression, in which case an explicit type
annotation might be necessary.
Source§fn from(split: SplitIters<IT>) -> Self
fn from(split: SplitIters<IT>) -> Self
Source§impl<L: Clone + Copy + 'static, I: Iterator<Item = ((usize, usize), L)> + Send + Sync, IT: IntoIterator<Item = ((usize, usize), L), IntoIter = I>> From<SplitIters<IT>> for Vec<NodeLabels<L, I>>
Conversion of a SplitIters of iterators on labelled pairs into a
sequences of pairs of starting points and associated lenders.
impl<L: Clone + Copy + 'static, I: Iterator<Item = ((usize, usize), L)> + Send + Sync, IT: IntoIterator<Item = ((usize, usize), L), IntoIter = I>> From<SplitIters<IT>> for Vec<NodeLabels<L, I>>
Conversion of a SplitIters of iterators on labelled pairs into a
sequences of pairs of starting points and associated lenders.
This is useful for converting the output of sorting utilities like
ParSortPairs or ParSortIters into a form suitable for
BvCompConfig::par_comp_lenders.
Note that it sufficient to write let lenders: Vec<_> = split_iters.into()
to perform the conversion. Type inference might not work properly if the
call is embedded in a larger expression, in which case an explicit type
annotation might be necessary.
Source§fn from(split: SplitIters<IT>) -> Self
fn from(split: SplitIters<IT>) -> Self
Auto Trait Implementations§
impl<I> Freeze for SplitIters<I>
impl<I> RefUnwindSafe for SplitIters<I>where
I: RefUnwindSafe,
impl<I> Send for SplitIters<I>where
I: Send,
impl<I> Sync for SplitIters<I>where
I: Sync,
impl<I> Unpin for SplitIters<I>
impl<I> UnsafeUnpin for SplitIters<I>
impl<I> UnwindSafe for SplitIters<I>where
I: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more