Trait graph::Graph[][src]

pub trait Graph<Node: Idx> {
    fn node_count(&self) -> Node;
fn edge_count(&self) -> Node; }
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

Returns the number of nodes in the graph.

Returns the number of edges in the graph.

Implementors