Trait graph::prelude::Graph

source ·
pub trait Graph<NI>where
    NI: Idx,{
    // Required methods
    fn node_count(&self) -> NI;
    fn edge_count(&self) -> NI;
}
Expand description

A graph is a tuple (N, E), where N is a set of nodes and E a set of edges. Each edge connects exactly two nodes.

Graph is parameterized over the node index type Node which is used to uniquely identify a node. An edge is a tuple of node identifiers.

Required Methods§

source

fn node_count(&self) -> NI

Returns the number of nodes in the graph.

source

fn edge_count(&self) -> NI

Returns the number of edges in the graph.

Implementors§

source§

impl<NI, NV, EV> Graph<NI> for DirectedALGraph<NI, NV, EV>where NI: Idx, NV: Send + Sync, EV: Send + Sync,

source§

impl<NI, NV, EV> Graph<NI> for DirectedCsrGraph<NI, NV, EV>where NI: Idx,

source§

impl<NI, NV, EV> Graph<NI> for UndirectedALGraph<NI, NV, EV>where NI: Idx, NV: Send + Sync, EV: Send + Sync,

source§

impl<NI, NV, EV> Graph<NI> for UndirectedCsrGraph<NI, NV, EV>where NI: Idx,