Boost logo

Boost Users :

From: Tom Matelich (tmatelich_at_[hidden])
Date: 2002-12-02 00:11:04


From: David Abrahams [mailto:dave_at_[hidden]]
> Tom Matelich <tmatelich_at_[hidden]> writes:
>
> > From: David Abrahams [mailto:dave_at_[hidden]]
> > Sent: Sunday, December 01, 2002 5:58 AM
> >> Tom Matelich <tmatelich_at_[hidden]> writes:
> >>
> >> > trying to make my graphviz representation look nicer and I
> >> was wondering if
> >> > there is an algorithm already for simplifying:
> >
> > -----B\
> > A--< \
> > --------C
> > D----------/
> >
> > to:
> >
> > A---B---C
> > D------/
> >
> > This eliminated the A-C edge.
> >
> > Thanks for considering my problem.
>
> Maybe you want a minimum spanning tree, where the weight of each edge
> in the tree is determined by the distance between its vertices in some
> topological sort?
>
> That seems to solve the cases shown above pretty nicely.

I had looked at the minimum spanning tree docs a bit, I thought it looked
pretty good. The docs say undirected graph though. I'm currently using a
directed graph. I suppose I could create a separate graph. Oh, I see,
create an undirected graph with weights as you said, and use the minimum
spanning algorithm to choose the useful edges. I like it, hope it works.

Thanks,

Tom

-----------------------------------------------------------------------
DISCLAIMER: Information contained in this message and/or
attachment(s) may contain confidential information of Zetec, Inc.
If you have received this transmission in error, please notify
the sender by return email.
-----------------------------------------------------------------------


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net