Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpeeters committed Jan 25, 2024
1 parent 4df4f92 commit 4917fd7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Based on the polynomial functors described in [Niu and Spivak](https://topos.sit
- mermaid integration (optional)

```scala
"com.julianpeeters" %% "polynomial" % "0.3.0"
"com.julianpeeters" %% "polynomial-mermaid" % "0.3.0"
"com.julianpeeters" %% "polynomial" % "0.4.0"
"com.julianpeeters" %% "polynomial-mermaid" % "0.4.0"
```

---
Expand Down Expand Up @@ -74,19 +74,16 @@ be printed, with titles and labels in the following formats:
import polynomial.`object`.Monomial.{Store, Interface}
import polynomial.mermaid.{Format, Mermaid, given}
import polynomial.morphism.~>
import polynomial.product.

type F[Y] = ((Store[Boolean, _] Store[Boolean, _]) ~> (Interface[Int, Int, _]Interface[Int, Int, _]))[Y]
type F[Y] = (Store[Boolean, _] ~> Interface[Byte, Char, _])[Y]

val M: Mermaid[F] = summon[Mermaid[F]]
// M: Mermaid[F] = polynomial.mermaid.Mermaid$$anon$5@1264038d
// M: Mermaid[F] = polynomial.mermaid.Mermaid$$anon$1@5e90ebb6

println(M.showTitledGraph(titleFmt = Format.Generic, graphFmt = Format.Generic))
println(M.showGraph(graphFmt = Format.Generic))
// ```mermaid
// graph LR;
// TitleStart[ ]:::hidden~~~TitleBody[<span style="font-family:Courier">S<sub>1</sub></span>𝑦<sup><span style="font-family:Courier">S<sub>1</sub></span></sup> ⊗ <span style="font-family:Courier">S<sub>2</sub></span>𝑦<sup><span style="font-family:Courier">S<sub>2</sub></span></sup> → <span style="font-family:Courier">B<sub>1</sub></span>𝑦<sup><span style="font-family:Courier">A<sub>1</sub></span></sup> ⊗ <span style="font-family:Courier">B<sub>2</sub></span>𝑦<sup><span style="font-family:Courier">A<sub>2</sub></span></sup>]:::title~~~TitleEnd[ ]:::hidden
// A1:::hidden---|<span style="font-family:Courier">A<sub>1</sub></span>|S1[<span style="font-family:Courier">S<sub>1</sub></span>]---|<span style="font-family:Courier">B<sub>1</sub></span>|B1:::hidden;
// A2:::hidden---|<span style="font-family:Courier">A<sub>2</sub></span>|S2[<span style="font-family:Courier">S<sub>2</sub></span>]---|<span style="font-family:Courier">B<sub>2</sub></span>|B2:::hidden;
// A:::hidden---|<span style="font-family:Courier">A</span>|S[<span style="font-family:Courier">S</span>]---|<span style="font-family:Courier">B</span>|B:::hidden;
//
// classDef empty fill:background;
// classDef point width:0px, height:0px;
Expand Down
5 changes: 2 additions & 3 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,12 @@ be printed, with titles and labels in the following formats:
import polynomial.`object`.Monomial.{Store, Interface}
import polynomial.mermaid.{Format, Mermaid, given}
import polynomial.morphism.~>
import polynomial.product.

type F[Y] = ((Store[Boolean, _] Store[Boolean, _]) ~> (Interface[Int, Int, _]Interface[Int, Int, _]))[Y]
type F[Y] = (Store[Boolean, _] ~> Interface[Byte, Char, _])[Y]

val M: Mermaid[F] = summon[Mermaid[F]]

println(M.showTitledGraph(titleFmt = Format.Generic, graphFmt = Format.Generic))
println(M.showGraph(graphFmt = Format.Generic))
```

```mermaid
Expand Down

0 comments on commit 4917fd7

Please sign in to comment.