I'm having trouble drawing an Euler traversal of a tree. You can see an example of an Euler traversal on the picture on the corrsponding wiki page.
As an example, I have the following simple tree:
Code: Select all
\pstree{\Tc[name=n1]{3pt}\nput{90}{\pssucc}{$1$}}{%
\Tc{name=n2]{3pt}\nput{270}{\pssucc}{$2$}%
\Tc{name=n3]{3pt}\nput{270}{\pssucc}{$3$}%
}%
Code: Select all
\ncline[linestyle=dashed,offset=-5pt]{n1}{n2}
\ncline[linestyle=dashed,offset=5pt]{n1}{n2}
I thought that one solution would be to somehow declare a new node at these two endpoints. That would make it easy then by using the
\nccurve
command, but I do not know how to declare new nodes for these endpoints.Another problem of course is the second
\ncline
. Its starting point should actually be below the root node (node 1), so that I can continue from that point to the other node (node 3).Does anyone have a solution or an example of how to draw tours or point me to the right direction how to do it?
Thank you!