[Lemon-user] Question regarding ListUGraph
Alpár Jüttner
alpar at cs.elte.hu
Mon Jul 28 11:13:26 CEST 2008
Hi Dragos,
FYI, we are working on the new, better and slightly incompatible version
of Lemon. It will been released soon (with version number 1.0), then we
discontinue the development of the 0.x series.
This new series features an improved and cleaner interfaces and tools,
better documentation and has better windows support.
The development version of the this series is already quite stable, so I
really suggest to consider using it instead of the 0.x series.
You can check out the latest version from its hg repo:
$ hg clone http://lemon.cs.elte.hu/hg/lemon
$ cd lemon
$ autoreconf -vi
$ ./configure
$ make
$ make install
If you prefer, I can also send you a tar.gz file created from the latest
version.
Best regards,
Alpar
On Mon, 2008-07-28 at 09:06 +0200, Balazs Dezso wrote:
> Hi
>
> The ListGraph and ListUGraph have functions to remove edges and nodes.
>
> void ListGraph::erase(Node n);
> void ListGraph::erase(Edge n);
>
> void ListUGraph::erase(Node n);
> void ListUGraph::erase(UEdge n);
>
> Unfortunately, these functions cannot be seen in the docs, but we will correct
> it in few days.
>
> Best, Balazs
>
> On Monday 28 July 2008 01:42:37 Dragos Trinca wrote:
> > Hi,
> >
> > Yes, assigning information to nodes is exactly what I need. Thanks.
> >
> > Now, I have one more question. I was looking for a function that removes
> > nodes from a graph (and the corresponding edges), but I couldn't find one.
> >
> > Does anyone know how to do that?
> >
> > Thanks,
> >
> > Dragos
> >
> >
> >
> > ________________________________
> >
> > From: Balazs Dezso [mailto:deba at inf.elte.hu]
> > Sent: Mon 7/21/2008 4:34 AM
> > To: lemon-user at lemon.cs.elte.hu
> > Cc: Dragos Trinca
> > Subject: Re: [Lemon-user] Question regarding ListUGraph
> >
> >
> >
> > Hi
> >
> > In the implemented graphs (List, Smart) you cannot change the node or edge
> > type, but perhaps you would like to assign some data to each node. In such
> > case you can use the NodeMap, and EdgeMap types:
> >
> > ListUGraph g;
> > ListUGraph::Node n = g.addNode();
> > ListUGraph::NodeMap<int> im(g);
> > im[n] = 12;
> > std::cerr << im[n] << std::endl;
> >
> > What is perhaps enough for you:
> > ListUGraph g;
> > ListUGraph::NodeMap<T> tm(g);
> >
> > Generally, it is quite enough to store data for each node or edge in a
> > graph. In special cases, when your graph can be build on-the-fly, or some
> > sparser representation could be made for the graph, then own graph type
> > could be implemented, which node type could be whatever you want. For this
> > purpose there are some helper classes, but it is a harder topic...
> >
> > Best, Balazs
> >
> > On Sunday 20 July 2008 22:14:36 Dragos Trinca wrote:
> > > Hi,
> > >
> > > I need to use the class ListUGraph in such a way that every node in the
> > > graph is of my defined type, say ``T'' (where T can be anything), and not
> > > of type ``Node'' (as implicitly is).
> > >
> > > Does anyone know how to add nodes of locally defined type ``T'' to a
> > > graph ?
> > >
> > > Thanks in advance,
> > >
> > > Dragos
>
> _______________________________________________
> Lemon-user mailing list
> Lemon-user at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
More information about the Lemon-user
mailing list