Trait Searcher

Source
pub trait Searcher<N, V>: Contain<N>
where N: Node, V: Weight,
{ // Required methods fn search(&mut self, graph: impl Graph<N, V>, start: N) -> Vec<N>; fn reset(&mut self); }
Expand description

Searcher is a trait that defines the behavior of a graph search algorithm.

Required Methods§

Source

fn search(&mut self, graph: impl Graph<N, V>, start: N) -> Vec<N>

Search the graph for nodes.

Source

fn reset(&mut self)

Reset the search state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<N, V> Searcher<N, V> for BreadthFirstSearch<N>
where N: Node, V: Weight,

Source§

impl<N, V> Searcher<N, V> for DepthFirstSearch<N>
where N: Node, V: Weight,