Skip to main content

Graph

Trait Graph 

Source
pub trait Graph {
    // Required methods
    fn node_count(&self) -> usize;
    fn neighbors(&self, node: usize) -> Vec<usize>;

    // Provided method
    fn out_degree(&self, node: usize) -> usize { ... }
}

Required Methods§

Source

fn node_count(&self) -> usize

Source

fn neighbors(&self, node: usize) -> Vec<usize>

Provided Methods§

Source

fn out_degree(&self, node: usize) -> usize

Implementations on Foreign Types§

Source§

impl<N, E, Ty, Ix> Graph for Graph<N, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,

Available on crate feature petgraph only.
Source§

fn node_count(&self) -> usize

Source§

fn neighbors(&self, node: usize) -> Vec<usize>

Implementors§