Skip to main content

open_hypergraphs/strict/
mod.rs

1//! An implementation of Open Hypergraphs directly following the paper
2//! ["Data-Parallel Algorithms for String Diagrams"](https://arxiv.org/pdf/2305.01041).
3//!
4//! To use `Vec`-backed open hypergraphs, use the [`crate::strict::vec`] module, which provides some
5//! type-aliases specialised to the `Vec` backend.
6pub mod hypergraph;
7pub mod open_hypergraph;
8
9pub mod eval;
10pub mod functor;
11pub mod graph;
12pub mod layer;
13pub mod relation;
14
15pub use crate::array::*;
16pub use crate::category::*;
17pub use crate::finite_function::FiniteFunction;
18pub use crate::indexed_coproduct::IndexedCoproduct;
19pub use crate::semifinite::SemifiniteFunction;
20pub use hypergraph::Hypergraph;
21pub use open_hypergraph::*;
22
23#[cfg(test)]
24mod tests;
25
26pub mod vec {
27    //! Type alises for strict Open Hypergraphs using the [`VecKind`] array backend.
28    pub use crate::array::vec::*;
29    pub use crate::category::*;
30
31    pub type OpenHypergraph<Obj, Arr> =
32        crate::strict::open_hypergraph::OpenHypergraph<VecKind, Obj, Arr>;
33    pub type Hypergraph<Obj, Arr> = crate::strict::hypergraph::Hypergraph<VecKind, Obj, Arr>;
34    pub type FiniteFunction = crate::finite_function::FiniteFunction<VecKind>;
35    pub type SemifiniteFunction<T> = crate::semifinite::SemifiniteFunction<VecKind, T>;
36    pub type IndexedCoproduct<F> = crate::indexed_coproduct::IndexedCoproduct<VecKind, F>;
37}