Questions tagged [graph-tool]

Graph-tool is an efficient Python module for manipulation and statistical analysis of graphs (a.k.a. networks).

Graph-tool is an efficient Python module for manipulation and statistical analysis of graphs (a.k.a. networks). Contrary to most other Python modules with similar functionality, the core data structures and algorithms are implemented in C++, making extensive use of template metaprogramming, based heavily on the Boost Graph Library. This confers it a level of performance which is comparable (both in memory usage and computation time) to that of a pure C/C++ library.

Useful Links

283 questions
3
votes
1 answer

Graph-Tool -> Networkx

I am trying to save a graph generated by Graph-Tool and read it in with Networkx. I tried the GraphML format. Unfortunately I encounter KeyError: 'vector_float' as in the GraphML file a property is saved as the following:
user142040
  • 53
  • 6
3
votes
1 answer

Python graph-tool access vertex property by index efficiently

I have a list of vertex indices for which I need to get the corresponding vertex properties. I can think of doing that by the following code: [graph.vp["label"][ graph.vertex(i) ] for i in indices] It works fine, but can I avoid the python loop…
3
votes
1 answer

configure: error: CGAL library not found

My ultimate goal is to get python package graph_tool working on my system and also on ipynb if possible. I have already brew install graph-tool, as indicated here, but that's still insufficient. So I follow Anaconda instructions here, and I make…
tamtam
  • 641
  • 9
  • 24
3
votes
1 answer

How to access graph-tool edges? Why graph-tool edges don't have ids?

I am trying to access graph-tool edges. Example: Assume following graph. from graph_tool.all import * g = Graph() eprop = g.new_edge_property("int") g.edge_properties["distance"] = eprop v0 = g.add_vertex() v1 = g.add_vertex() v2 =…
JustSomeone
  • 171
  • 2
  • 12
3
votes
2 answers

Import a graph (network) in Julia

Does anybody now if there is any module that could let me import a graph (network) in Julia? Working with Python, I used the graph-tool package, which served me very well! I have my graphs in .gt file format. Can I use any module in Julia, so that I…
3
votes
3 answers

Average of numpy array ignoring specified value

I have a number of 1-dimensional numpy ndarrays containing the path length between a given node and all other nodes in a network for which I would like to calculate the average. The matter is complicated though by the fact that if no path exists…
P-M
  • 1,279
  • 2
  • 21
  • 35
3
votes
2 answers

Using a graph-tool efficiently

After a long thought, I finally decided to post this question here. Few days back I started using graph-tool to do various things. I have been using Networkx before that. I have already seen the impressive performance comparision and thought that…
Peaceful
  • 4,920
  • 15
  • 54
  • 79
3
votes
2 answers

configure needs C++14 support but gcc -v = 4.9.3

I am currently in the process of compiling graph-tool v1.13 from the Git version. I have managed to generate the configure file from autogen.sh but am now running into trouble. Running ./configure I receive the message: checking whether g++ supports…
P-M
  • 1,279
  • 2
  • 21
  • 35
3
votes
3 answers

graph-tool - reading edge lists from pandas dataframe

I'm starting working with graph-tool, importing a list of edges from a pandas dataframe df like: node1 node2 0 1 2 1 2 3 2 1 4 3 3 1 4 4 3 5 1 5 So basically a list of directed edges.…
Fabio Lamanna
  • 20,504
  • 24
  • 90
  • 122
3
votes
1 answer

Installing graph-tool on OSX 10.10 with homebrew

I attempted to install graphtool using the following commands: brew tap homebrew/science brew install graph-tool The install finishes successfully but when I import graph_tool, I see the following 'Symbol not found' error: Python 2.7.10 (default,…
triciajam
  • 31
  • 3
3
votes
0 answers

force home-brew to install graph-tools to the anaconda python interpretor

Im trying to install graph-tool library on mac os x 10.11.2 machine. I have two python interpreter installed, pre-installed python 2.7 and anaconda 3.5 $ which python /Users/Phoenix/anaconda/bin/python to install graph-tool I had to use…
Zingo
  • 600
  • 6
  • 23
3
votes
2 answers

'Error importing Gtk module: No module named repository' with graph_tool

Hello stack community! I'm not sure if my question is graph-tool related or gtk-related, but maybe both. Moreover, sorry if what I did while trying to solve it is plain stupid, I'm not a programmer by formal education, so I know just as much as I…
olga.bio
  • 281
  • 3
  • 15
3
votes
1 answer

Graph-tool: Look up vertex by user defined labels

I have been using networkx for all my network graphing application so far; however, this new project requires graphs with 10^8 nodes in the graph and networkx was not built to handle this number of nodes (it becomes incredibly slow), so I switched…
user2909415
  • 979
  • 3
  • 10
  • 26
3
votes
1 answer

Depth-first search by edge property

I am using graph-tool for python, a library which implements boost. I need to do a depth-first search using only edges which have the edge_property: rel_need = True So, i'm using gt.dfs_search(g, g.vertex(0), NeedFinder(rel_need, pred,…
shawnrushefsky
  • 141
  • 2
  • 7
3
votes
2 answers

Is there a python library capable of calculating the dual of a 3D mesh?

I looked into python-graph and the python bindings for the boost graph library but did not find anything relevant regarding the dual-ization of meshes (the vertices of the dual are the faces of the original graph and are connected by an edge in the…
Noam Kremen
  • 388
  • 1
  • 14
1 2
3
18 19