Hello Tiago and everyone,

I'd like to bring your attention to a question on stackoverflow, which
I'd also like to know the answer to:

http://stackoverflow.com/questions/9526827/graph-tool-how-to-access-properties

In particular, this bit:

"How do I get an object [vertex] with a certain title back from the
graph ? One way seems to be to create a vertex filter using
graph.set_edge_filter(...) and apply that - which seems a pretty
expensive operation considering all I want is to get one single object
back. I really don't want to maintain my own object title / vertex
index mapping as IMO, that is one of the tasks of the graph".

Consider, for example, the following simple situation: I've got an
existing set of vertices and then obtain information on edges between
them from somewhere, which may sometimes also involve vertices not yet
in the graph. In networkx, I would simply do: add_edge(x,y), where x
and y are vertex names (that have or have not been defined a priori
using add_node(x)).
Is there a straightforward way to do the same in graph_tool?

Thanks,
Mikhail
_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to