[][src]Struct rs_graph::search::bfs::BFS

pub struct BFS<'a, A, S, Q> where
    A: Adjacencies<'a>,
    S: ItemMap<A::Node, A::Edge>,
    Q: ItemQueue<A::Node>, 
{ /* fields omitted */ }

The BFS iterator.

Methods

impl<'a, A, S, Q> BFS<'a, A, S, Q> where
    A: Adjacencies<'a>,
    S: ItemMap<A::Node, A::Edge>,
    Q: ItemQueue<A::Node>, 
[src]

pub fn run(&mut self)[src]

Run the bfs completely.

Note that this method may run forever on an infinite graph.

pub fn into_data(self) -> (S, Q)[src]

Return the data structures used in the search.

pub fn incoming_edge(&self, u: A::Node) -> Option<A::Edge>[src]

Return the incoming edge of a node.

Trait Implementations

impl<'a, A, S, Q> Iterator for BFS<'a, A, S, Q> where
    A: Adjacencies<'a>,
    S: ItemMap<A::Node, A::Edge>,
    Q: ItemQueue<A::Node>, 
[src]

type Item = (A::Node, A::Edge)

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a, A, S, Q> RefUnwindSafe for BFS<'a, A, S, Q> where
    A: RefUnwindSafe,
    Q: RefUnwindSafe,
    S: RefUnwindSafe,
    <A as Adjacencies<'a>>::Incidence: RefUnwindSafe,
    <A as GraphType<'a>>::Node: RefUnwindSafe

impl<'a, A, S, Q> Send for BFS<'a, A, S, Q> where
    A: Send,
    Q: Send,
    S: Send,
    <A as Adjacencies<'a>>::Incidence: Send,
    <A as GraphType<'a>>::Node: Send

impl<'a, A, S, Q> Sync for BFS<'a, A, S, Q> where
    A: Sync,
    Q: Sync,
    S: Sync,
    <A as Adjacencies<'a>>::Incidence: Sync,
    <A as GraphType<'a>>::Node: Sync

impl<'a, A, S, Q> Unpin for BFS<'a, A, S, Q> where
    A: Unpin,
    Q: Unpin,
    S: Unpin,
    <A as Adjacencies<'a>>::Incidence: Unpin,
    <A as GraphType<'a>>::Node: Unpin

impl<'a, A, S, Q> UnwindSafe for BFS<'a, A, S, Q> where
    A: UnwindSafe,
    Q: UnwindSafe,
    S: UnwindSafe,
    <A as Adjacencies<'a>>::Incidence: UnwindSafe,
    <A as GraphType<'a>>::Node: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.