pub struct PermutedGraph<'a, G: SequentialGraph, P: SliceByValue<Value = usize> + ?Sized> {
pub graph: &'a G,
pub perm: &'a P,
}Expand description
A wrapper applying a permutation to the iterators of an underlying graph.
Note that nodes are simply remapped: thus, neither the iterator on the graph nor the successors are sorted.
Fields§
§graph: &'a GThe underlying graph.
perm: &'a PThe permutation to apply: node i of the permuted graph
corresponds to node perm[i] of the underlying graph.
Trait Implementations§
Source§impl<'a, G: Clone + SequentialGraph, P: Clone + SliceByValue<Value = usize> + ?Sized> Clone for PermutedGraph<'a, G, P>
impl<'a, G: Clone + SequentialGraph, P: Clone + SliceByValue<Value = usize> + ?Sized> Clone for PermutedGraph<'a, G, P>
Source§fn clone(&self) -> PermutedGraph<'a, G, P>
fn clone(&self) -> PermutedGraph<'a, G, P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, G: Debug + SequentialGraph, P: Debug + SliceByValue<Value = usize> + ?Sized> Debug for PermutedGraph<'a, G, P>
impl<'a, G: Debug + SequentialGraph, P: Debug + SliceByValue<Value = usize> + ?Sized> Debug for PermutedGraph<'a, G, P>
Source§impl<'a, 'b, G: SequentialGraph, P: SliceByValue<Value = usize>> IntoLender for &'b PermutedGraph<'a, G, P>
impl<'a, 'b, G: SequentialGraph, P: SliceByValue<Value = usize>> IntoLender for &'b PermutedGraph<'a, G, P>
Source§type Lender = <PermutedGraph<'a, G, P> as SequentialLabeling>::Lender<'b>
type Lender = <PermutedGraph<'a, G, P> as SequentialLabeling>::Lender<'b>
The lender type that this type converts into.
Source§fn into_lender(self) -> Self::Lender
fn into_lender(self) -> Self::Lender
Converts this type into a
Lender.Source§impl<G: SequentialGraph, P: SliceByValue<Value = usize>> SequentialLabeling for PermutedGraph<'_, G, P>
impl<G: SequentialGraph, P: SliceByValue<Value = usize>> SequentialLabeling for PermutedGraph<'_, G, P>
type Label = usize
Source§type Lender<'b> = NodeLabels<'b, <G as SequentialLabeling>::Lender<'b>, P>
where
Self: 'b
type Lender<'b> = NodeLabels<'b, <G as SequentialLabeling>::Lender<'b>, P> where Self: 'b
Source§fn num_arcs_hint(&self) -> Option<u64>
fn num_arcs_hint(&self) -> Option<u64>
Returns the number of arcs in the graph, if available.
Source§fn iter_from(&self, from: usize) -> Self::Lender<'_>
fn iter_from(&self, from: usize) -> Self::Lender<'_>
Returns an iterator over the labeling starting at
from (included). Read moreSource§fn par_node_apply<A: Default + Send, F: Fn(Range<usize>) -> A + Sync, R: Fn(A, A) -> A + Sync>(
&self,
func: F,
fold: R,
granularity: Granularity,
pl: &mut impl ConcurrentProgressLog,
) -> A
fn par_node_apply<A: Default + Send, F: Fn(Range<usize>) -> A + Sync, R: Fn(A, A) -> A + Sync>( &self, func: F, fold: R, granularity: Granularity, pl: &mut impl ConcurrentProgressLog, ) -> A
Applies
func to each chunk of nodes of size node_granularity in
parallel, and folds the results using fold. Read moreSource§fn par_apply<F: Fn(Range<usize>) -> A + Sync, A: Default + Send, R: Fn(A, A) -> A + Sync, D: for<'a> Succ<Input = usize, Output<'a> = usize>>(
&self,
func: F,
fold: R,
granularity: Granularity,
deg_cumul: &D,
pl: &mut impl ConcurrentProgressLog,
) -> A
fn par_apply<F: Fn(Range<usize>) -> A + Sync, A: Default + Send, R: Fn(A, A) -> A + Sync, D: for<'a> Succ<Input = usize, Output<'a> = usize>>( &self, func: F, fold: R, granularity: Granularity, deg_cumul: &D, pl: &mut impl ConcurrentProgressLog, ) -> A
Applies
func to each chunk of nodes containing approximately
arc_granularity arcs in parallel and folds the results using fold. Read moreSource§impl<'b, G: SequentialGraph + SplitLabeling, P: SliceByValue<Value = usize> + Send + Sync + Clone> SplitLabeling for PermutedGraph<'b, G, P>
impl<'b, G: SequentialGraph + SplitLabeling, P: SliceByValue<Value = usize> + Send + Sync + Clone> SplitLabeling for PermutedGraph<'b, G, P>
type SplitLender<'a> = Take<<PermutedGraph<'b, G, P> as SequentialLabeling>::Lender<'a>> where Self: 'a
type IntoIterator<'a> = Iter<<PermutedGraph<'b, G, P> as SequentialLabeling>::Lender<'a>> where Self: 'a
fn split_iter(&self, how_many: usize) -> Self::IntoIterator<'_>
impl<G: SequentialGraph, P: SliceByValue<Value = usize>> SequentialGraph for PermutedGraph<'_, G, P>
Auto Trait Implementations§
impl<'a, G, P> Freeze for PermutedGraph<'a, G, P>where
P: ?Sized,
impl<'a, G, P> RefUnwindSafe for PermutedGraph<'a, G, P>
impl<'a, G, P> Send for PermutedGraph<'a, G, P>
impl<'a, G, P> Sync for PermutedGraph<'a, G, P>
impl<'a, G, P> Unpin for PermutedGraph<'a, G, P>where
P: ?Sized,
impl<'a, G, P> UnsafeUnpin for PermutedGraph<'a, G, P>where
P: ?Sized,
impl<'a, G, P> UnwindSafe for PermutedGraph<'a, G, P>
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
Mutably borrows from an owned value. Read more
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Truncate the current UnsignedInt to a possibly smaller size
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.