[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: self-loops in graphs
From: |
Michael Piotrowski |
Subject: |
Re: self-loops in graphs |
Date: |
Thu, 18 Jun 1998 21:30:06 +0200 (METDST) |
Hi,
First of all, thanks to Jeff for the hint. I just found the posting (dated
last Thursday): I had somehow missed it (perhaps because the subject was
different from mine) and I complained to a co-worker that nobody seemed to
care, when he pointed out that there was indeed an answer to my question on
the list :-)
It works great. Here is what I currently have; maybe someone's interested:
File "mydefs":
extend @DiagramPrint @Diag
macro @FinalNode {
@Circle vmargin{0f} @Circle hmargin{0.5f}
}
File "diag.lt":
@Diag
{
Start:: @Node outlinestyle{noline}
@DP
||1c One:: @Circle 1 ||2c Two:: @Circle 2 ||2c Three:: @FinalNode 3 //1c
//
@Arrow from address@hidden to address@hidden ylabel{r-1}
@Arrow from {One} to {Two} ylabel{r-2} ylabelprox{below}
@CurveArrow from address@hidden to address@hidden ylabel{r-1}
ylabelprox{below}
@CCurveArrow from {One} to {Three} ylabel{r-3}
@Arrow from {Two} to {Three} ylabel{r-3} ylabelprox{below}
}
The diagram looks really good, but I'm not yet entirely satisfied with two
things:
- The way I coded the start state is clumsy, and there might be more than one,
and then it'll become a mess. I tried to code the in-pointing arrow as a
label which contains a diagram which only contains an arrow, but I need to be
able to label this arrow, and I'm not yet good enough at Lout (I have to admit
that I find the syntax not really more intuitive than TeX's) to handle this;
it didn't seem very elegant to me, either.
- The code for the end state seems equally bad to me; I'm not really sure why
it works, and I hate that :-)
Since I'd eventually like to have these diagrams directly produced from
corresponding grammars, I'd prefer a clean solution. I'd thus be grateful for
any comments.
Thanks again
--
Michael Piotrowski <address@hidden>
<http://www.linguistik.uni-erlangen.de/~mxp/>
Department of Computational Linguistics --- University of Erlangen, Germany