Expand description
§Open Hypergraphs
A library for representing the two-dimensional syntax of string diagrams. Use it if you think of your data in terms of “boxes and wires” like this:
┌───┐
────│ f │────┐ ┌───┐
└───┘ └────│ │
│ h │────
┌───┐ ┌────│ │
────│ g │────┘ └───┘
└───┘
A concrete example: neural networks, where wires carry tensors (e.g. a 3×4 matrix) and boxes are tensor operations (e.g. matmul)
Modules§
- array
- A minimal set of array operations which are sufficient to implement open hypergraphs.
- category
- Traits for types forming hypergraph and symmetric monoidal categories
- finite_
function - Finite Functions represented as arrays of natural numbers
- functor
- Functors between categories of open hypergraphs
- hypergraph
- The category of hypergraphs has objects represented by
Hypergraph
and arrows byarrow::HypergraphArrow
. - indexed_
coproduct - Indexed coproducts over finite and semifinite functions
- layer
- A Coffman-Graham-inspired layering algorithm.
- open_
hypergraph - The primary datastructure for representing cospans of hypergraphs
- operations
- Tensorings of operations
- semifinite
- Arrays of arbitrary types, pre-composable with finite functions