Skip to content

Commit

Permalink
chore(readme): use mermaid for the diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
ChieloNewctle committed Oct 15, 2023
1 parent 52668c5 commit 2ceec3a
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,29 @@ A general suffix automaton implementation in Rust.
Python bindings and some utilities are also available.
Please check out [`general-sam-py`](https://github.com/ModelTC/general-sam-py).

| [![the suffix automaton of abcbc][sam-of-abcbc]][sam-oi-wiki] |
| :----------------------------------------------------------------------------: |
| The suffix automaton of abcbc, image from [后缀自动机 - OI Wiki][sam-oi-wiki]. |
```mermaid
flowchart LR
init((ε))
a((a))
b((b))
ab((ab))
bc(((bc)))
abc((abc))
abcb((abcb))
abcbc(((abcbc)))
init -- a --> a
init -- b --> b
a -- b --> ab
b -- c --> bc
init -- c --> bc
ab -- c --> abc
bc -- b --> abcb
abc -- b --> abcb
abcb -- c --> abcbc
```

[sam-of-abcbc]: https://oi-wiki.org/string/images/SAM/SA_suffix_links.svg
[sam-oi-wiki]: https://oi-wiki.org/string/sam/
> The suffix automaton of abcbc.
## Examples

Expand Down

0 comments on commit 2ceec3a

Please sign in to comment.