[][src]Trait bigraph::StaticBigraphFromDigraph

pub trait StaticBigraphFromDigraph<NodeData, EdgeData, IndexType: PrimInt>: StaticBigraph<NodeData, EdgeData, IndexType> + Sized {
    type Topology: StaticGraph<NodeData, EdgeData, IndexType>;
    fn new(
        _topology: Self::Topology,
        _binode_mapping_function: fn(_: &NodeData) -> NodeData
    ) -> Self;
fn new_unchecked(
        _topology: Self::Topology,
        _binode_mapping_function: fn(_: &NodeData) -> NodeData
    ) -> Self; }

A static bigraph that can be created from a static digraph. Since the graph is static, the resulting topology will be the input topology, only the bigraph node mapping function will be computed on top.

Associated Types

type Topology: StaticGraph<NodeData, EdgeData, IndexType>

The type of directed topology the bigraph is created from.

Loading content...

Required methods

fn new(
    _topology: Self::Topology,
    _binode_mapping_function: fn(_: &NodeData) -> NodeData
) -> Self

Converts the given topology into a bigraph with the given mapping function. If the resulting graph has wrongly mapped nodes, the method panics.

fn new_unchecked(
    _topology: Self::Topology,
    _binode_mapping_function: fn(_: &NodeData) -> NodeData
) -> Self

Converts the given topology into a bigraph with the given mapping function. Unmapped nodes are stored without mapping. If a node maps to another node, but the other node does not map back, then this method panics.

Loading content...

Implementors

impl<NodeData: Eq + Hash + Debug, EdgeData, IndexType: PrimInt + Debug, Topology: StaticGraph<NodeData, EdgeData, IndexType>> StaticBigraphFromDigraph<NodeData, EdgeData, IndexType> for NodeBigraphWrapper<NodeData, EdgeData, IndexType, Topology>[src]

type Topology = Topology

Loading content...