Arrow

Trait Arrow 

Source
pub trait Arrow: Sized {
    type Object;

    // Required methods
    fn source(&self) -> Self::Object;
    fn target(&self) -> Self::Object;
    fn identity(a: Self::Object) -> Self;
    fn compose(&self, other: &Self) -> Option<Self>;
}

Required Associated Types§

Required Methods§

Source

fn source(&self) -> Self::Object

Source

fn target(&self) -> Self::Object

Source

fn identity(a: Self::Object) -> Self

the identity morphism on a

Source

fn compose(&self, other: &Self) -> Option<Self>

Compose morphisms in diagrammatic order: self ; other

§Errors

Returns None if self.target() != other.source().

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.

Implementors§

Source§

impl<K: ArrayKind> Arrow for FiniteFunction<K>

Source§

type Object = <K as ArrayKind>::I

Source§

impl<K: ArrayKind, O, A> Arrow 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<K: ArrayKind, T> Arrow for SemifiniteArrow<K, T>
where K::Type<T>: Array<K, T>,

Source§

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