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
1
vote
1 answer

Is there a way to compute clusters around specific nodes in a graph?

I have a graph, have computed the PageRank of its vectors, and would now like to compute clusters for the 20 nodes with highest PageRank. I am using graph-tool and networkx so far. Is there a known and practical way to do this?
1
vote
0 answers

Efficient way to save lots of small graphs with graph-tool

Just wondering if anyone is aware of the most efficient way to do this. I have around 120k small graphs (<10 vertices). Loading the file through pickle is very slow. Two obvious solutions are: Save one large graph and use property maps to index the…
OliasailO
  • 522
  • 3
  • 11
1
vote
1 answer

MacOS: brew install graph-tool on High Sierra

I'm using High Sierra and am unable to install graph-tool via brew install. Given below is the output after brew installing. > brew install graph-tool graph-tool: macOS Mojave or newer is required. Error: An unsatisfied requirement failed this…
Ian
  • 3,605
  • 4
  • 31
  • 66
1
vote
1 answer

Sort pagerank values of graph-tool vertices

I have a directed graph-tool graph g. I also have already calculated the pagerank for each vertex in the graph using graph_tool.centrality.pagerank as shown below. v_pr = g.new_vertex_property('float') pr = pagerank(u,…
EFL
  • 938
  • 4
  • 11
  • 23
1
vote
1 answer

Conda install graph-tool failed on win-64

I've tried to install graph-tool via anaconda for python 2.7: conda install -c kristanarmstrong graph-tool I got the following error: UnsatisfiableError: The following specifications were found to be in conflict: - graph-tool Use "conda info…
1
vote
0 answers

graph-tool Euler circuit

I am currently using the graph-tool library with Python (3.6) and I just noticed that there is no functionality to extract a Eulerian/Hamiltonian path/circuit. Is there a particular reason for this? I mean I can implement it myself but the point of…
Bermudes
  • 133
  • 7
1
vote
0 answers

(Python graph-tool) graph-tool search using OpenMP? Can finding all paths between a source and target vertex be made parallel?

I am currently using graph_tool.topology.all_paths to find all paths between two vertices of a specific length, but the documentation doesn't explicitly say what algorithm is used. I assume it is either the breadth-first search (BFS) or Dijkstra’s…
1
vote
1 answer

python graph-tool: Fastest way to add edges without duplicates?

What's the fastest/most performant way to add edges without duplicates to a digraph in Python's graph-tool? The naive solution would be to call g.edge(u, v) before adding edges, but that seems like quite a performance hit, especially in scale-free…
geofurb
  • 489
  • 4
  • 13
1
vote
1 answer

How to attach graph-tool to Django using Docker

I need to use some graph-tool calculations in my Django project. So I started with docker pull tiagopeixoto/graph-tool and then added it to my Docker-compose file: version: '3' services: db: image: postgres graph-tool: image:…
D. Make
  • 579
  • 2
  • 6
  • 23
1
vote
1 answer

How can I calculate the girth of a graph using graph-tool?

Graph-tool offers a lot of tools for assessing a graph: https://graph-tool.skewed.de/static/doc/topology.html. However, I can't find any method for calculating the girth, i.e., the shortest cycle in the graph. Do you know if there exists an…
blindeyes
  • 409
  • 3
  • 13
1
vote
1 answer

How to check OpenMP usage in python graph-tool

I am using python graph-tool for this algorithm in order to find min-cut in a large graph. My algorithm needs several calls to this function, and it seems to be the bottleneck. So I want to ensure if it is being run as efficiently as it could be…
arpanmangal
  • 1,770
  • 1
  • 17
  • 34
1
vote
1 answer

Draw only biggest connected subgraph in graph-tool

In graph-tool, is there a way to only draw the biggest connected subgraph? I'm currently having one big connected subgraph and a few smaller connected subgraphs I'm not particularly interested in. I'm not sure how to find the subgraphs before…
jvdh
  • 612
  • 1
  • 6
  • 19
1
vote
1 answer

Is there a way to add a title or a caption to the drawing using graph_tool

At least some workaround would be appreciated. I am trying to save the figures as pdfs and then use it with latex as an animation. If there is a way to automatically add captions that will be really helpful as I am going to have about 50-60 figures.…
user2939212
  • 405
  • 1
  • 6
  • 14
1
vote
0 answers

How to compile graph-tool in ubuntu

I am trying to compile and install graph-tool version 2.26 in ubuntu using ./configure but I am getting following error checking for boostlib >= 1.55.0 (105500)... yes checking whether the Boost::Python library is available... yes checking whether…
Soumya
  • 87
  • 1
  • 2
  • 15
1
vote
1 answer

graph-tool graph_draw plot a colorbar legend

So I have a graph and I draw this graph to a PDF using this command: graph_draw(G_Sub, vertex_fill_color=pr, vertex_size=prop_to_size(pr, mi ...: =5, ma=15), vorder=pr, vcmap=matplotlib.cm.gist_heat, output="G_Sub_pr. ...: pdf",…
Ahmedn1
  • 626
  • 1
  • 9
  • 20