Skip to content

Commit

Permalink
refactor kroki diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Nov 24, 2024
1 parent 48e3358 commit e6d6f0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
EinExprs = "b1794770-133b-4de1-afb4-526377e9f4c5"
GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2"
Kroki = "b3565e16-c1f2-4fe9-b4ab-221c88942068"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
NetworkLayout = "46757867-2c16-5918-afeb-47bfcb05e46a"
Tenet = "85d41934-b9cd-44e1-8730-56d86f15f3ec"
Expand Down
15 changes: 5 additions & 10 deletions docs/src/developer/type-hierarchy.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Inheritance and Traits

```@setup kroki
using Kroki
```

Julia (and in general, all modern languages like Rust or Go) implement Object Oriented Programming (OOP) in a rather restricted form compared to popular OOP languages like Java, C++ or Python.
In particular, they forbid _structural inheritance_; i.e. inheriting fields from parent superclass(es).

Expand All @@ -13,17 +9,17 @@ Julia design space on this topic is not completely clear. Julia has _abstract ty

As of the time of writing, the type hierarchy of Tenet looks like this:

```@example kroki
mermaid"""graph TD
```mermaid
flowchart TD
id1(AbstractTensorNetwork)
id2(AbstractQuantum)
id3(AbstractAnsatz)
id4(AbstractMPO)
id5(AbstractMPS)
id1 -->|inherits| id2 -->|inherits| id3 -->|inherits| id4 -->|inherits| id5
id1 -->|inherits| TensorNetwork
id2 -->|inherits| Quantum
id3 -->|inherits| Ansatz
id1 -->|implements| TensorNetwork
id2 -->|implements| Quantum
id3 -->|implements| Ansatz
id3 -->|inherits| Product
id4 -->|inherits| MPO
id5 -->|inherits| MPS
Expand All @@ -36,5 +32,4 @@ mermaid"""graph TD
style id3 stroke-dasharray: 5 5
style id4 stroke-dasharray: 5 5
style id5 stroke-dasharray: 5 5
"""
```

0 comments on commit e6d6f0c

Please sign in to comment.