Zigzag engine: cubical/string-diagram constructions in Rust. Reference for topolei.
Add the core slice computation functionality for n-diagrams: - Rewrite::apply_forward/apply_backward: Apply rewrites to transform diagrams in either direction - RewriteN::apply_forward/apply_backward: Handle n-dimensional rewrites by modifying cospan structure via cone contraction/expansion - DiagramN::regular_slice(h): Compute regular slice at height h by traversing cospans, applying forward then backward rewrites - DiagramN::singular_slice(h): Compute singular slice (cospan apex) by applying forward rewrite to the corresponding regular slice - DiagramN::target(): Now properly computes the last regular slice - DiagramN::slices(): Iterator yielding all slices in order r0,s0,r1,... - DiagramN::regular_slices()/singular_slices(): Filtered iterators All 48 tests pass. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||