pub struct Bidirectional<'a, I, N, E, Ty, Ix, M1, M2> { /* private fields */ }
Expand description

The Bidirectional strategy. Performs the seach operation with two (may be different) state machines

Rules: Each machine needs to be totally opposite to the other one. Thus:

  • The target node of the a machine m1 needs to be the starting node of the machine m2
  • The starting node of the a walker m1 needs to be the target node of a machine m2
  • The direction of the walker m1 needs to be petgraph::Outgoing and the m2 must be petgraph::Incoming

Implementations§

source§

impl<'a, I, N, E, Ty: EdgeType, Ix: IndexType, M1, M2> Bidirectional<'a, I, N, E, Ty, Ix, M1, M2>where M1: Walker<Ix>, M2: Walker<Ix>,

source

pub fn new( graph: &'a Graph<I, N, E, Ty, Ix>, machine_a: M1, machine_b: M2 ) -> Self

Trait Implementations§

source§

impl<'a, I, N, E, Ty: EdgeType, Ix: IndexType, M1, M2> Walker<Ix> for Bidirectional<'a, I, N, E, Ty, Ix, M1, M2>where M1: Walker<Ix>, M2: Walker<Ix>,

source§

fn step(&mut self) -> WalkerState<Ix>

Auto Trait Implementations§

§

impl<'a, I, N, E, Ty, Ix, M1, M2> RefUnwindSafe for Bidirectional<'a, I, N, E, Ty, Ix, M1, M2>where E: RefUnwindSafe, I: RefUnwindSafe, Ix: RefUnwindSafe, M1: RefUnwindSafe, M2: RefUnwindSafe, N: RefUnwindSafe, Ty: RefUnwindSafe,

§

impl<'a, I, N, E, Ty, Ix, M1, M2> !Send for Bidirectional<'a, I, N, E, Ty, Ix, M1, M2>

§

impl<'a, I, N, E, Ty, Ix, M1, M2> !Sync for Bidirectional<'a, I, N, E, Ty, Ix, M1, M2>

§

impl<'a, I, N, E, Ty, Ix, M1, M2> Unpin for Bidirectional<'a, I, N, E, Ty, Ix, M1, M2>where Ix: Unpin, M1: Unpin, M2: Unpin,

§

impl<'a, I, N, E, Ty, Ix, M1, M2> UnwindSafe for Bidirectional<'a, I, N, E, Ty, Ix, M1, M2>where E: RefUnwindSafe, I: RefUnwindSafe, Ix: UnwindSafe + RefUnwindSafe, M1: UnwindSafe, M2: UnwindSafe, N: RefUnwindSafe, Ty: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.