I'm currently working with modelchecking of symbolic dependecy graphs for my semester project in Computer Science, and am dire need of an easy way to draw dependency graphs preferably using TikZ.
My problem is somewhat related to this, but i need the arcs to be directed.
A hyperedge e
is a tuple e = (v, T)
where v
is a source node and T
is the target set. Each element in T
is a tuple t = (w, t)
where w
is either a non-negative integer or a parameter and t
is a target node.
The follwing example (found here) does exactly what i need, except i need the arcs to be directed.
\documentclass{standalone}
\usepackage{tikz}
\newcommand{\hyperedge}[4][180]{
\draw (#2.#1) ++(#1:.5) edge (#2) edge (#3) edge (#4);
}
\begin{document}
\begin{tikzpicture}[
y=.7cm, x=1cm,
every edge/.append style={thick}
]
\node (c) at (0,0) {c};
\node (a) at (1,1) {d};
\node (b) at (1,-1) {e};
\hyperedge[0]{c}{b}{a}
\end{tikzpicture}
\end{document}
I tried adding ->
as an option to the tikzpicture, but this resulted in arrows not just to the target set but also to the source node.
every edge/.append style={thick,->}
?->
as an option to tikzpicture. It produces arrows pointing towards either ends of the hyperedge, i.e. also procuces an arrow pointing towards the source node.\hypergraph
command sufficient? Graph drawing isn't my forte, but for this specific case you could modify the\draw
command in the definition of\hypergraph
to\draw (#2.#1) ++(#1:.5) edge (#2) edge[->] (#3) edge[->] (#4);
. I can add an answer if that is good enough.