Skip to main content

GraphOrderExt

Trait GraphOrderExt 

Source
pub trait GraphOrderExt: Graph {
    // Provided methods
    fn bfs_order(&self, root: Self::Vertex) -> Vec<Self::Vertex>
       where Self: VertexMap<bool> { ... }
    fn dfs_order(&self, root: Self::Vertex) -> Vec<Self::Vertex>
       where Self: VertexMap<bool> { ... }
    fn dfs_tree(&self, root: Self::Vertex) -> <Self as EdgeMap<bool>>::Emap
       where Self: EdgeMap<bool> + VertexMap<bool> { ... }
    fn for_each_connected_components<F>(&self, f: F)
       where Self: VertexMap<bool>,
             F: FnMut(&Self, Self::Vertex, &[(Self::Vertex, Option<Self::Vertex>)]) { ... }
}

Provided Methods§

Source

fn bfs_order(&self, root: Self::Vertex) -> Vec<Self::Vertex>
where Self: VertexMap<bool>,

Source

fn dfs_order(&self, root: Self::Vertex) -> Vec<Self::Vertex>
where Self: VertexMap<bool>,

Source

fn dfs_tree(&self, root: Self::Vertex) -> <Self as EdgeMap<bool>>::Emap
where Self: EdgeMap<bool> + VertexMap<bool>,

Source

fn for_each_connected_components<F>(&self, f: F)
where Self: VertexMap<bool>, F: FnMut(&Self, Self::Vertex, &[(Self::Vertex, Option<Self::Vertex>)]),

f: |g, root, ord: [vertex, parent]| {}

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<G> GraphOrderExt for G
where G: Graph + ?Sized,