[prev in list] [next in list] [prev in thread] [next in thread]
List: graphviz-interest
Subject: Re: [graphviz-interest] iterating through subgraphs
From: Kleag <kleag () free ! fr>
Date: 2009-08-30 8:48:39
Message-ID: 200908301048.39737.kleag () free ! fr
[Download RAW message or body]
Le dimanche 30 août 2009 03:36:15, John Ellson a écrit :
> You might find tclpkg/gv/gv.cpp a useful source for fragments like
> this. This file
> is the base of all the swig-generated language bindings.
Thanks for the pointer.
>
> In answer to your question, to iterate over subgraphs you need to
> iterate over the nodes in the
> meta_graph, e.g from the rm(Agraph_t *) function, you can find
> (paraphrasing) :
>
> for (e = agfstout(g->meta_node->graph, g->meta_node); e;
> e = agnxtout(g->meta_node->graph, e)) {
> sg = agusergraph(aghead(e));
> /* do something to sg */
> }
Yes, that works. Thanks a lot.
Gaël
>
> John
>
> On 08/29/2009 06:01 PM, Kleag wrote:
> > Hello,
> >
> > I'm trying to use graphviz as a library in kgraphviewer instead of dot. I
> > use as documentation "Drawing graphs with Graphviz, Emden R. Gansner,
> > April 27, 2009".
> >
> > I'm able to iterate through nodes and edges but not through subgraphs. I
> > was able to find suitable API in cgraph.h but not in graph.h which seems
> > to be the right thing to use.
> >
> > Thanks in advance for any help.
> >
> > Best regards,
> >
> > Gaël
>
> _______________________________________________
> graphviz-interest@research.att.com
> https://mailman.research.att.com/mailman/listinfo/graphviz-interest
--
KsirK - a world domination strategy game
http://techbase.kde.org/Projects/Games/Tactic_and_Strategy/KsirK
KGraphViewer - a GraphViz dot graphs viewer
http://extragear.kde.org/apps/kgraphviewer
_______________________________________________
graphviz-interest@research.att.com
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic