Struct graph::walkers::beam::Beam

source ·
pub struct Beam<'a, I, N, E, Ty, Ix, F> {
    pub direction: Direction,
    /* private fields */
}
Expand description

The Beam search strategy implementation

This strategy has a limit of candidate routes at all times. For example, keeps the 3 best routes and all the others get discarded

Fields§

§direction: Direction

Implementations§

source§

impl<'a, I, N, E, Ty: EdgeType, Ix: IndexType, F> Beam<'a, I, N, E, Ty, Ix, F>where F: FnMut(&NodeIndex<Ix>, &NodeIndex<Ix>) -> Ordering,

source

pub fn new( graph: &'a Graph<I, N, E, Ty, Ix>, journey: (NodeIndex<Ix>, Option<NodeIndex<Ix>>), successors: usize, compare: F, direction: Direction ) -> Self

Trait Implementations§

source§

impl<'a, I, N, E, Ty: EdgeType, Ix: IndexType, F> Walker<Ix> for Beam<'a, I, N, E, Ty, Ix, F>where F: FnMut(&NodeIndex<Ix>, &NodeIndex<Ix>) -> Ordering,

source§

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

Auto Trait Implementations§

§

impl<'a, I, N, E, Ty, Ix, F> RefUnwindSafe for Beam<'a, I, N, E, Ty, Ix, F>where E: RefUnwindSafe, F: RefUnwindSafe, I: RefUnwindSafe, Ix: RefUnwindSafe, N: RefUnwindSafe, Ty: RefUnwindSafe,

§

impl<'a, I, N, E, Ty, Ix, F> !Send for Beam<'a, I, N, E, Ty, Ix, F>

§

impl<'a, I, N, E, Ty, Ix, F> !Sync for Beam<'a, I, N, E, Ty, Ix, F>

§

impl<'a, I, N, E, Ty, Ix, F> Unpin for Beam<'a, I, N, E, Ty, Ix, F>where F: Unpin, Ix: Unpin,

§

impl<'a, I, N, E, Ty, Ix, F> UnwindSafe for Beam<'a, I, N, E, Ty, Ix, F>where E: RefUnwindSafe, F: UnwindSafe, I: RefUnwindSafe, Ix: UnwindSafe + RefUnwindSafe, 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.