Hi Tiago, thanks for you reply: On 06/28/2013 08:00 AM, graph-tool-request@skewed.de wrote:
The code you're trying to run is not valid C++ (you cannot mix typedefs and variable definitions). Furthermore you should not try to guess the type of the graph, and instead you should use the pre-defined typedefs.
I see. Time to grab a copy of intro to C++ then ;-)
You have to use the following code:
_add_code = ''' using namespace boost;
typedef graph_traits<graph_graph_t>::vertex_descriptor vertex_t;
for (int i = 0; i < n; ++i) { add_edge(vertex_t(edges[i, 0]), vertex_t(edges[i, 1]), graph); } '''
Modifying your script with the above code worked for me. Note that you have to use the development version of graph-tool in git, since the current version has a bug in the run_action module.
I cloned the repository, ran autogen.sh, but it doesn't produce any configure script (attached the console output). Am I missing some step?
I think that a function to add several edges at once is a useful one. If you open a ticket for it, I'll implement it when I find some time.
Sure!
Alternatively, how do I get to call BGL's add_edge with the wrapped graph type, i.e. the one typedef'd automatically by inline? Everything should work fine with the properly overloaded functions... I.e., whenever you call add_edge(), it should select the appropriately overloaded function for the correct type.
Cheers, Tiago
-- Giovanni Luca Ciampaglia Postdoctoral fellow Center for Complex Networks and Systems Research Indiana University ✎ 910 E 10th St ∙ Bloomington ∙ IN 47408 ☞ http://cnets.indiana.edu/ ✉ gciampag@indiana.edu