diff options
author | JSDurand <mmemmew@gmail.com> | 2023-07-21 19:14:51 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-07-21 19:14:51 +0800 |
commit | 0bf1d3d9d883d0b63792c68541b23404aae0ec8f (patch) | |
tree | c45575c5eed6205d49dcb97017ae37027bd3fb9e | |
parent | ffb6e689d28d295733b90f2b9e184205e33f19c2 (diff) |
Print graphs with edges in order
* chain/src/item/default/mod.rs:
* graph/src/labelled/binary.rs:
* graph/src/labelled/double.rs:
* graph/src/lib.rs: If we set the option "ordering" to be "out" in the
declaration of nodes at the beginning, then GraphViz will not change
the order of children out of nodes. This is much better looking in
my opinion.
* INSTALL: make insists in changing this file, so let it be.
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | chain/src/item/default/mod.rs | 2 | ||||
-rw-r--r-- | graph/src/labelled/binary.rs | 2 | ||||
-rw-r--r-- | graph/src/labelled/double.rs | 2 | ||||
-rw-r--r-- | graph/src/lib.rs | 2 |
5 files changed, 5 insertions, 5 deletions
@@ -1,7 +1,7 @@ Installation Instructions ************************* - Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2023 Free + Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, diff --git a/chain/src/item/default/mod.rs b/chain/src/item/default/mod.rs index 0dc613b..b84d4ea 100644 --- a/chain/src/item/default/mod.rs +++ b/chain/src/item/default/mod.rs @@ -1095,7 +1095,7 @@ impl DefaultForest<ForestLabel<GrammarLabel>> { let preamble = "digraph nfa { fontname=\"Helvetica,Arial,sans-serif\" - node [fontname=\"Helvetica,Arial,sans-serif\"] + node [fontname=\"Helvetica,Arial,sans-serif\", ordering=out] edge [fontname=\"Helvetica,Arial,sans-serif\"] rankdir=LR;\n"; diff --git a/graph/src/labelled/binary.rs b/graph/src/labelled/binary.rs index ccbd5cb..5120522 100644 --- a/graph/src/labelled/binary.rs +++ b/graph/src/labelled/binary.rs @@ -208,7 +208,7 @@ impl<T: GraphLabel> Graph for PLGraph<T> { let preamble = "digraph nfa { fontname=\"Helvetica,Arial,sans-serif\" - node [fontname=\"Helvetica,Arial,sans-serif\"] + node [fontname=\"Helvetica,Arial,sans-serif\", ordering=out] edge [fontname=\"Helvetica,Arial,sans-serif\"] rankdir=LR;\n"; diff --git a/graph/src/labelled/double.rs b/graph/src/labelled/double.rs index ab2b27c..a641c74 100644 --- a/graph/src/labelled/double.rs +++ b/graph/src/labelled/double.rs @@ -135,7 +135,7 @@ impl<T: GraphLabel> Graph for DLGraph<T> { let preamble = "digraph nfa { fontname=\"Helvetica,Arial,sans-serif\" - node [fontname=\"Helvetica,Arial,sans-serif\"] + node [fontname=\"Helvetica,Arial,sans-serif\", ordering=out] edge [fontname=\"Helvetica,Arial,sans-serif\"] rankdir=LR;\n"; diff --git a/graph/src/lib.rs b/graph/src/lib.rs index 9e5b1cc..e27ace0 100644 --- a/graph/src/lib.rs +++ b/graph/src/lib.rs @@ -113,7 +113,7 @@ pub trait Graph: Default { fn print_viz(&self, filename: &str) -> Result<(), std::io::Error> { let preamble = "digraph nfa { fontname=\"Helvetica,Arial,sans-serif\" - node [fontname=\"Helvetica,Arial,sans-serif\"] + node [fontname=\"Helvetica,Arial,sans-serif\", ordering=out] edge [fontname=\"Helvetica,Arial,sans-serif\"] rankdir=LR;\n"; |