nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b3e70c
)
lib/graphs: introduce `show_dot` for debugging digraphs.
author
Alexandre Terrasa
<alexandre@moz-code.org>
Fri, 11 Sep 2015 16:48:32 +0000
(12:48 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Thu, 15 Oct 2015 18:07:59 +0000
(14:07 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/graphs/digraph.nit
patch
|
blob
|
history
diff --git
a/lib/graphs/digraph.nit
b/lib/graphs/digraph.nit
index
0b74c4c
..
bc9a8af
100644
(file)
--- a/
lib/graphs/digraph.nit
+++ b/
lib/graphs/digraph.nit
@@
-383,6
+383,15
@@
interface Digraph[V: Object]
return s
end
+ # Open Graphviz with `self.to_dot`.
+ #
+ # Mainly used for debugging.
+ fun show_dot do
+ var f = new ProcessWriter("dot", "-Txlib")
+ f.write to_dot
+ f.close
+ end
+
## ------------ ##
## Neighborhood ##
## ------------ ##