pub struct Identity;Expand description
The identity functor, which implements Functor for any signature.
Trait Implementations§
Source§impl<K: ArrayKind, O, A> Functor<K, O, A, O, A> for Identity
impl<K: ArrayKind, O, A> Functor<K, O, A, O, A> for Identity
Source§fn map_object(
&self,
a: &SemifiniteFunction<K, O>,
) -> IndexedCoproduct<K, SemifiniteFunction<K, O>>
fn map_object( &self, a: &SemifiniteFunction<K, O>, ) -> IndexedCoproduct<K, SemifiniteFunction<K, O>>
Action on objects
Source§fn map_arrow(&self, f: &OpenHypergraph<K, O, A>) -> OpenHypergraph<K, O, A>
fn map_arrow(&self, f: &OpenHypergraph<K, O, A>) -> OpenHypergraph<K, O, A>
Action on arrows.
If you have implemented
map_operations, you can implement this simply as
define_map_arrow(self, f).Source§fn map_operations(&self, ops: Operations<K, O, A>) -> OpenHypergraph<K, O, A>
fn map_operations(&self, ops: Operations<K, O, A>) -> OpenHypergraph<K, O, A>
Action on tensoring of operations, i.e., compute
F(f₀) ● F(f₁) ● .. ● F(fn) for
generators f_i.