Trait Algorithms

Source
pub trait Algorithms<K, V>: AnyGraph<K, V> + Kinship<K, V>
where K: Key, V: Value,
{ // Provided methods fn bfs(&self) -> Option<Self> { ... } fn bfs_with_starting_vertex( &self, starting_vertex: &Vertex<K, V>, ) -> Option<Self> { ... } fn dfs(&self) -> Option<Self> { ... } fn dfs_with_starting_vertex( &self, starting_vertex: &Vertex<K, V>, ) -> Option<Self> { ... } }
Expand description

An interface describing all the algorithms that can be used on any kind of graphs.

Provided Methods§

Source

fn bfs(&self) -> Option<Self>

Execute a Broad Search First the return the discovered graph. There is no order in which the edges are treated.

Source

fn bfs_with_starting_vertex( &self, starting_vertex: &Vertex<K, V>, ) -> Option<Self>

Execute a Broad Search First with a starting vertex the return the discovered graph. There is no order in which the edges are treated.

Source

fn dfs(&self) -> Option<Self>

Execute a Deep Search First the return the discovered graph. There is no order in which the edges are treated.

Source

fn dfs_with_starting_vertex( &self, starting_vertex: &Vertex<K, V>, ) -> Option<Self>

Execute a Deep Search First with a starting vertex the return the discovered graph. There is no order in which the edges are treated.

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<K, V> Algorithms<K, V> for BasicDirectedGraph<K, V>
where K: Key, V: Value,

Source§

impl<K, V> Algorithms<K, V> for BasicUndirectedGraph<K, V>
where K: Key, V: Value,