我的代码是:
digraph G {
rankdir=LR
node [color=black,shape=record]
node0 [label="{<data>node 0|<next>}"]
node1 [label="{<data>node 1|<next>}"]
new_node [label="{<data>new_node|<next>}"]
null0 [shape=none, label="NULL"]
null1 [shape=none, label="NULL"]
head [shape=none, label="head"]
ptr [shape=none, label="ptr"]
indirect [shape=none]
head->ptr
indirect->node0:next [constraint=false headport=s tailport=n];
ptr->node0
node0:next:c->node1 [arrowhead=normal, arrowtail=dot, dir=both, tailclip=false];
node1:next:c -> null0 [tailclip=false, arrowtail=dot, dir=both]
new_node:next:c->null1 [arrowhead=normal, arrowtail=dot, dir=both, tailclip=false];
{rank=same; indirect node1;}
}
我想node0
和间接在同一级别。然而,当我改变
{rank=same; indirect node1;} -> {rank=same; indirect node0;}
他们将有错误消息:"Error: lost indirect node0 edge"
我想要的实际图表: