Trait graph::walkers::Walker

source ·
pub trait Walker<Ix = DefaultIx> {
    // Required method
    fn step(&mut self) -> WalkerState<Ix>;
}
Expand description

The Walker trait. All solution-searching strategies must implement this trait.

The walkers are state machines that implement this trait that provides a step method to move the walker to the next node in the graph according to the actual implementation of the trait following each strategy algorithm.

The trait dictates that all of the types that want to traverse a graph must return the result of performing a single step.

Required Methods§

source

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

Implementors§

source§

impl<'a, I, N, E, Ty: EdgeType, Ix: IndexType> Walker<Ix> for BreadthFirst<'a, I, N, E, Ty, Ix>

source§

impl<'a, I, N, E, Ty: EdgeType, Ix: IndexType> Walker<Ix> for DepthFirst<'a, I, N, E, Ty, Ix>

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§

impl<'a, I, N, E, Ty: EdgeType, Ix: IndexType, F> Walker<Ix> for BestFirst<'a, I, N, E, Ty, Ix, F>where F: Fn(NodeIndex<Ix>, EdgeIndex<Ix>, f32, NodeIndex<Ix>) -> f32,

source§

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

source§

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

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§

impl<'a, Ix: IndexType> Walker<Ix> for SimAnnealing<'a, Ix>