Hi Tiago,
thanks for you reply:
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!
autogen_graph-tool.txt (6.37 KB)