Skip to main content

DirectedDegrees

Trait DirectedDegrees 

Source
pub trait DirectedDegrees<NI: Idx> {
    // Required methods
    fn out_degree(&self, node: NI) -> NI;
    fn in_degree(&self, node: NI) -> NI;
}

Required Methods§

Source

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

Returns the number of edges where the given node is a source node.

Source

fn in_degree(&self, node: NI) -> NI

Returns the number of edges where the given node is a target node.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<NI: Idx, NV, EV> DirectedDegrees<NI> for DirectedALGraph<NI, NV, EV>

Source§

impl<NI: Idx, NV, EV> DirectedDegrees<NI> for DirectedCsrGraph<NI, NV, EV>