Skip to main content

TopologicalSortExt

Trait TopologicalSortExt 

Source
pub trait TopologicalSortExt: DirectedGraph {
    // Provided method
    fn topological_sort(&self) -> Vec<Self::Vertex>
       where Self: VertexMap<usize> { ... }
}

Provided Methods§

Source

fn topological_sort(&self) -> Vec<Self::Vertex>
where Self: VertexMap<usize>,

Examples found in repository?
crates/aizu_online_judge/src/grl/grl_4_b.rs (line 8)
5pub fn grl_4_b(reader: impl Read, writer: impl Write) {
6    prepare_io!(reader, writer);
7    sc!(vs, es, (graph, _): @DirectedGraphScanner::<usize, ()>::new(vs, es));
8    pp!(@lf @it graph.topological_sort());
9}
More examples
Hide additional examples
crates/aizu_online_judge/src/grl/grl_4_a.rs (line 8)
5pub fn grl_4_a(reader: impl Read, writer: impl Write) {
6    prepare_io!(reader, writer);
7    sc!(vs, es, (graph, _): @DirectedGraphScanner::<usize, ()>::new(vs, es));
8    pp!((graph.topological_sort().len() != vs) as u32);
9}

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§