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§
Sourcefn dagger(&self) -> Self
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.
Sourcefn spider(
s: FiniteFunction<K>,
t: FiniteFunction<K>,
w: Self::Object,
) -> Option<Self>
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§
Sourcefn half_spider(s: FiniteFunction<K>, w: Self::Object) -> Option<Self>
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", so this trait is not object safe.