Skip to main content

Spider

Trait Spider 

Source
pub trait Spider<K: ArrayKind>: Arrow {
    // Required methods
    fn dagger(&self) -> Self;
    fn spider(
        s: FiniteFunction<K>,
        t: FiniteFunction<K>,
        w: Self::Object,
    ) -> Option<Self>;

    // Provided method
    fn half_spider(s: FiniteFunction<K>, w: Self::Object) -> Option<Self> { ... }
}
Expand description

Categories with hypergraph structure. We call this Spider to avoid confusion with the crate::strict::Hypergraph struct.

Required Methods§

Source

fn dagger(&self) -> Self

Given an Arrow with type f : A → B, construct its dagger f† : B → A by using Hypergraph structure to bend sources to targets and vice-versa.

Source

fn spider( s: FiniteFunction<K>, t: FiniteFunction<K>, w: Self::Object, ) -> Option<Self>

Construct a spider using a type w, and source s and target t interface maps.

Provided Methods§

Source

fn half_spider(s: FiniteFunction<K>, w: Self::Object) -> Option<Self>

Construct a “half-spider”: a spider whose t leg is identity.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<K: ArrayKind, O, A> Spider<K> for open_hypergraphs::strict::open_hypergraph::OpenHypergraph<K, O, A>
where K::Type<K::I>: NaturalArray<K>, K::Type<O>: Array<K, O> + PartialEq, K::Type<A>: Array<K, A>,

Source§

impl<O: Clone + PartialEq, A: Clone + PartialEq> Spider<VecKind> for open_hypergraphs::lax::open_hypergraph::OpenHypergraph<O, A>