| Crates.io | open-hypergraphs |
| lib.rs | open-hypergraphs |
| version | 0.2.7 |
| created_at | 2025-02-27 23:10:29.686719+00 |
| updated_at | 2025-09-24 18:13:33.815211+00 |
| description | Data-Parallel Algorithms for Open Hypergraphs |
| homepage | |
| repository | https://github.com/hellas-ai/open-hypergraphs |
| max_upload_size | |
| id | 1572264 |
| size | 299,740 |
Open Hypergraphs are a general, differentiable and data-parallel datastructure for syntax. Here’s a few examples of suitable uses:
This code is an implementation of the paper Data-Parallel Algorithms for String Diagrams.
An example for defining a simple expression language (polynomial circuits) and evaluating its terms is given here.
A complete example showing term construction, rendering as SVG using open-hypergraphs-dot, and serialization to JSON can be found here. This example produces the following open hypergraph:
which serializes to JSON as below:
{
"sources": [3,0],
"targets": [4],
"hypergraph": {
"nodes":[
{"Interval":{"lower":0,"upper":1}},
"Int","Int","Int","Int"
],
"edges": ["Cast","Neg","Add"],
"adjacency": [
{"sources":[0],"targets":[1]},
{"sources":[1],"targets":[2]},
{"sources":[3,2],"targets":[4]}
],
"quotient":[[],[]]
}
}