pub trait Algorithms<K, V>: AnyGraph<K, V> + Kinship<K, V>{
// 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§
Sourcefn bfs(&self) -> Option<Self>
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.
Sourcefn bfs_with_starting_vertex(
&self,
starting_vertex: &Vertex<K, V>,
) -> Option<Self>
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.
Sourcefn dfs(&self) -> Option<Self>
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.
Sourcefn dfs_with_starting_vertex(
&self,
starting_vertex: &Vertex<K, V>,
) -> Option<Self>
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.