Trait FiniteDigraph

Source
pub trait FiniteDigraph: FiniteGraph {
    // Required methods
    fn src(&self, e: Self::Edge<'_>) -> Self::Node<'_>;
    fn snk(&self, e: Self::Edge<'_>) -> Self::Node<'_>;
}
Expand description

A (finite) directed graph with a known number of nodes and edges.

For each edge the source and the sink node may be returned.

Required Methods§

Source

fn src(&self, e: Self::Edge<'_>) -> Self::Node<'_>

Return the source node of an edge.

Source

fn snk(&self, e: Self::Edge<'_>) -> Self::Node<'_>

Return the sink node of an edge.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'g, G> FiniteDigraph for &'g G
where G: FiniteDigraph,

Source§

fn src(&self, e: Self::Edge<'_>) -> Self::Node<'_>

Source§

fn snk(&self, e: Self::Edge<'_>) -> Self::Node<'_>

Source§

impl<G> FiniteDigraph for Rc<G>
where G: FiniteDigraph,

Source§

fn src(&self, e: Self::Edge<'_>) -> Self::Node<'_>

Source§

fn snk(&self, e: Self::Edge<'_>) -> Self::Node<'_>

Implementors§

Source§

impl<'g, G> FiniteDigraph for Network<'g, G>
where G: FiniteDigraph,

Source§

impl<'g, G> FiniteDigraph for ReverseDigraph<'g, G>
where G: FiniteDigraph,

Source§

impl<ID> FiniteDigraph for VecGraph<ID>
where ID: PrimInt + Unsigned,

Source§

impl<ID, N, E> FiniteDigraph for LinkedListGraph<ID, N, E>
where ID: PrimInt + Unsigned + 'static,