Skip to content

Commit

Permalink
Improve Mermaid diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
adrhill committed Mar 12, 2024
1 parent 7147871 commit 28aad40
Showing 1 changed file with 44 additions and 26 deletions.
70 changes: 44 additions & 26 deletions docs/src/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,56 +17,74 @@ Advanced users are welcome to code more backends and submit pull requests!

### Forward mode
```mermaid
stateDiagram-v2
pushforward --> value_and_pushforward
value_and_pushforward --> value_and_pushforward!
pushforward! --> value_and_pushforward!
flowchart LR
subgraph Gradient
gradient --> value_and_gradient
value_and_gradient --> value_and_gradient!
gradient! --> value_and_gradient!
end
subgraph Jacobian
jacobian --> value_and_jacobian
value_and_jacobian --> value_and_jacobian!
jacobian! --> value_and_jacobian!
value_and_jacobian! --> value_and_pushforward!
gradient --> value_and_gradient
value_and_gradient --> value_and_gradient!
gradient! --> value_and_gradient!
value_and_gradient! --> value_and_pushforward!
end
subgraph Multiderivative
multiderivative --> value_and_multiderivative
value_and_multiderivative --> value_and_multiderivative!
multiderivative! --> value_and_multiderivative!
value_and_multiderivative! --> value_and_pushforward!
end
subgraph Derivative
derivative --> value_and_derivative
end
subgraph Pushforward
pushforward --> value_and_pushforward
value_and_pushforward --> value_and_pushforward!
pushforward! --> value_and_pushforward!
end
value_and_jacobian! --> value_and_pushforward!
value_and_gradient! --> value_and_pushforward!
value_and_multiderivative! --> value_and_pushforward!
value_and_derivative --> value_and_pushforward
```

### Reverse mode
```mermaid
stateDiagram-v2
pullback --> value_and_pullback
value_and_pullback --> value_and_pullback!
pullback! --> value_and_pullback!
flowchart LR
subgraph Gradient
gradient --> value_and_gradient
value_and_gradient --> value_and_gradient!
gradient! --> value_and_gradient!
end
subgraph Jacobian
jacobian --> value_and_jacobian
value_and_jacobian --> value_and_jacobian!
jacobian! --> value_and_jacobian!
value_and_jacobian! --> value_and_pullback!
gradient --> value_and_gradient
value_and_gradient --> value_and_gradient!
gradient! --> value_and_gradient!
value_and_gradient! --> value_and_pullback!
end
subgraph Multiderivative
multiderivative --> value_and_multiderivative
value_and_multiderivative --> value_and_multiderivative!
multiderivative! --> value_and_multiderivative!
value_and_multiderivative! --> value_and_pullback!
end
subgraph Derivative
derivative --> value_and_derivative
end
subgraph Pullback
pullback --> value_and_pullback
value_and_pullback --> value_and_pullback!
pullback! --> value_and_pullback!
end
value_and_jacobian! --> value_and_pullback!
value_and_gradient! --> value_and_pullback!
value_and_multiderivative! --> value_and_pullback!
value_and_derivative --> value_and_pullback
```

0 comments on commit 28aad40

Please sign in to comment.