pub enum EventPred {
Init {},
Unknown {
node: usize,
pred: usize,
distance: usize,
},
Known {
node: usize,
pred: usize,
},
Done {},
}
Expand description
Types of callback events generated during breadth-first visits keeping track of parent nodes.
Variants§
Init
This event should be used to set up state at the start of the visit.
Note that this event will not happen if the visit is empty, that is, all of the roots are already visited or filtered.
Unknown
The node has been encountered for the first time: we are traversing a new tree arc, unless all node fields are equal to the root.
Fields
Known
The node has been encountered before: we are traversing a back arc, a forward arc, or a cross arc.
Note however that in parallel contexts it might happen that callback
with event Unknown
has not been called yet by
the thread who discovered the node.
Done
The visit has been completed.
Note that this event will not happen if the visit is empty (that is, if the root has already been visited) or if the visit is stopped by a callback returning an error.
Trait Implementations§
Source§impl Event for EventPred
impl Event for EventPred
Source§type FilterArgs = FilterArgsPred
type FilterArgs = FilterArgsPred
Source§impl<G: RandomAccessGraph + Sync> Parallel<EventPred> for ParFair<G, true>
impl<G: RandomAccessGraph + Sync> Parallel<EventPred> for ParFair<G, true>
Source§fn par_visit_filtered_with<R: IntoIterator<Item = usize>, T: Clone + Send + Sync, E: Send, C: Fn(&mut T, EventPred) -> ControlFlow<E, ()> + Sync, F: Fn(&mut T, <EventPred as Event>::FilterArgs) -> bool + Sync>(
&mut self,
roots: R,
init: T,
callback: C,
filter: F,
thread_pool: &ThreadPool,
) -> ControlFlow<E, ()>
fn par_visit_filtered_with<R: IntoIterator<Item = usize>, T: Clone + Send + Sync, E: Send, C: Fn(&mut T, EventPred) -> ControlFlow<E, ()> + Sync, F: Fn(&mut T, <EventPred as Event>::FilterArgs) -> bool + Sync>( &mut self, roots: R, init: T, callback: C, filter: F, thread_pool: &ThreadPool, ) -> ControlFlow<E, ()>
Source§fn par_visit_filtered<R: IntoIterator<Item = usize>, E: Send, C: Fn(A) -> ControlFlow<E, ()> + Sync, F: Fn(A::FilterArgs) -> bool + Sync>(
&mut self,
roots: R,
callback: C,
filter: F,
thread_pool: &ThreadPool,
) -> ControlFlow<E, ()>
fn par_visit_filtered<R: IntoIterator<Item = usize>, E: Send, C: Fn(A) -> ControlFlow<E, ()> + Sync, F: Fn(A::FilterArgs) -> bool + Sync>( &mut self, roots: R, callback: C, filter: F, thread_pool: &ThreadPool, ) -> ControlFlow<E, ()>
Source§fn par_visit_with<R: IntoIterator<Item = usize>, T: Clone + Send + Sync, E: Send, C: Fn(&mut T, A) -> ControlFlow<E, ()> + Sync>(
&mut self,
roots: R,
init: T,
callback: C,
thread_pool: &ThreadPool,
) -> ControlFlow<E, ()>
fn par_visit_with<R: IntoIterator<Item = usize>, T: Clone + Send + Sync, E: Send, C: Fn(&mut T, A) -> ControlFlow<E, ()> + Sync>( &mut self, roots: R, init: T, callback: C, thread_pool: &ThreadPool, ) -> ControlFlow<E, ()>
Source§fn par_visit<R: IntoIterator<Item = usize>, E: Send, C: Fn(A) -> ControlFlow<E, ()> + Sync>(
&mut self,
roots: R,
callback: C,
thread_pool: &ThreadPool,
) -> ControlFlow<E, ()>
fn par_visit<R: IntoIterator<Item = usize>, E: Send, C: Fn(A) -> ControlFlow<E, ()> + Sync>( &mut self, roots: R, callback: C, thread_pool: &ThreadPool, ) -> ControlFlow<E, ()>
Source§impl<G: RandomAccessGraph + Sync> Parallel<EventPred> for ParLowMem<G>
impl<G: RandomAccessGraph + Sync> Parallel<EventPred> for ParLowMem<G>
Source§fn par_visit_filtered_with<R: IntoIterator<Item = usize>, T: Clone + Send + Sync, E: Send, C: Fn(&mut T, EventPred) -> ControlFlow<E, ()> + Sync, F: Fn(&mut T, FilterArgsPred) -> bool + Sync>(
&mut self,
roots: R,
init: T,
callback: C,
filter: F,
thread_pool: &ThreadPool,
) -> ControlFlow<E, ()>
fn par_visit_filtered_with<R: IntoIterator<Item = usize>, T: Clone + Send + Sync, E: Send, C: Fn(&mut T, EventPred) -> ControlFlow<E, ()> + Sync, F: Fn(&mut T, FilterArgsPred) -> bool + Sync>( &mut self, roots: R, init: T, callback: C, filter: F, thread_pool: &ThreadPool, ) -> ControlFlow<E, ()>
Source§fn par_visit_filtered<R: IntoIterator<Item = usize>, E: Send, C: Fn(A) -> ControlFlow<E, ()> + Sync, F: Fn(A::FilterArgs) -> bool + Sync>(
&mut self,
roots: R,
callback: C,
filter: F,
thread_pool: &ThreadPool,
) -> ControlFlow<E, ()>
fn par_visit_filtered<R: IntoIterator<Item = usize>, E: Send, C: Fn(A) -> ControlFlow<E, ()> + Sync, F: Fn(A::FilterArgs) -> bool + Sync>( &mut self, roots: R, callback: C, filter: F, thread_pool: &ThreadPool, ) -> ControlFlow<E, ()>
Source§fn par_visit_with<R: IntoIterator<Item = usize>, T: Clone + Send + Sync, E: Send, C: Fn(&mut T, A) -> ControlFlow<E, ()> + Sync>(
&mut self,
roots: R,
init: T,
callback: C,
thread_pool: &ThreadPool,
) -> ControlFlow<E, ()>
fn par_visit_with<R: IntoIterator<Item = usize>, T: Clone + Send + Sync, E: Send, C: Fn(&mut T, A) -> ControlFlow<E, ()> + Sync>( &mut self, roots: R, init: T, callback: C, thread_pool: &ThreadPool, ) -> ControlFlow<E, ()>
Source§fn par_visit<R: IntoIterator<Item = usize>, E: Send, C: Fn(A) -> ControlFlow<E, ()> + Sync>(
&mut self,
roots: R,
callback: C,
thread_pool: &ThreadPool,
) -> ControlFlow<E, ()>
fn par_visit<R: IntoIterator<Item = usize>, E: Send, C: Fn(A) -> ControlFlow<E, ()> + Sync>( &mut self, roots: R, callback: C, thread_pool: &ThreadPool, ) -> ControlFlow<E, ()>
Source§impl<G: RandomAccessGraph> Sequential<EventPred> for Seq<G>
impl<G: RandomAccessGraph> Sequential<EventPred> for Seq<G>
Source§fn visit_filtered_with<R: IntoIterator<Item = usize>, T, E, C: FnMut(&mut T, EventPred) -> ControlFlow<E, ()>, F: FnMut(&mut T, FilterArgsPred) -> bool>(
&mut self,
roots: R,
init: T,
callback: C,
filter: F,
) -> ControlFlow<E, ()>
fn visit_filtered_with<R: IntoIterator<Item = usize>, T, E, C: FnMut(&mut T, EventPred) -> ControlFlow<E, ()>, F: FnMut(&mut T, FilterArgsPred) -> bool>( &mut self, roots: R, init: T, callback: C, filter: F, ) -> ControlFlow<E, ()>
Source§fn visit_filtered<R: IntoIterator<Item = usize>, E, C: FnMut(A) -> ControlFlow<E, ()>, F: FnMut(A::FilterArgs) -> bool>(
&mut self,
roots: R,
callback: C,
filter: F,
) -> ControlFlow<E, ()>
fn visit_filtered<R: IntoIterator<Item = usize>, E, C: FnMut(A) -> ControlFlow<E, ()>, F: FnMut(A::FilterArgs) -> bool>( &mut self, roots: R, callback: C, filter: F, ) -> ControlFlow<E, ()>
Source§fn visit_with<R: IntoIterator<Item = usize>, T, E, C: FnMut(&mut T, A) -> ControlFlow<E, ()>>(
&mut self,
roots: R,
init: T,
callback: C,
) -> ControlFlow<E, ()>
fn visit_with<R: IntoIterator<Item = usize>, T, E, C: FnMut(&mut T, A) -> ControlFlow<E, ()>>( &mut self, roots: R, init: T, callback: C, ) -> ControlFlow<E, ()>
Source§fn visit<R: IntoIterator<Item = usize>, E, C: FnMut(A) -> ControlFlow<E, ()>>(
&mut self,
roots: R,
callback: C,
) -> ControlFlow<E, ()>
fn visit<R: IntoIterator<Item = usize>, E, C: FnMut(A) -> ControlFlow<E, ()>>( &mut self, roots: R, callback: C, ) -> ControlFlow<E, ()>
impl Eq for EventPred
impl StructuralPartialEq for EventPred
Auto Trait Implementations§
impl Freeze for EventPred
impl RefUnwindSafe for EventPred
impl Send for EventPred
impl Sync for EventPred
impl Unpin for EventPred
impl UnwindSafe for EventPred
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, 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
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, 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