Trait rs_graph::graph::Digraph[][src]

pub trait Digraph<'a>: Graph<'a> {
    type OutEdgeIter: 'a + Iterator<Item = (Self::Edge, Self::Node)>;
    type InEdgeIter: 'a + Iterator<Item = (Self::Edge, Self::Node)>;
    fn src(&'a self, e: Self::Edge) -> Self::Node;
fn snk(&'a self, e: Self::Edge) -> Self::Node;
fn outedges(&'a self, u: Self::Node) -> Self::OutEdgeIter;
fn inedges(&'a self, u: Self::Node) -> Self::InEdgeIter; }

Trait for a general directed graph.

This trait adds a few additional methods to explicitely access the direction information of an edge. In particular, the direction information can be used in the following ways:

  • The src and snk methods return the source and sink nodes of an edge.
  • The iterators outedges and inedges iterate only over edges leaving or entering a certain node, respectively.

Associated Types

Type of an iterator over the forward edges leaving a node.

Type of an iterator over the backward edges entering a node.

Required Methods

Return the source node of an edge.

Return the sink node of an edge.

Return an iterator over the outgoing edges of a node.

The iterator returns only forward edges.

Return an iterator over the incoming edges of a node.

The iterator returns only backward edges.

Implementations on Foreign Types

impl<'a, G> Digraph<'a> for &'a G where
    G: Digraph<'a>, 
[src]

Implementors