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
0
votes
1 answer

Handling RabbitMQ heartbeats when cpu is loaded 100% for a long time

I'm using pika 1.1 and graph-tool 3.4 in my python application. It consumes tasks from RabbitMQ, which then used to build graphs with graph-tool and then runs some calculations. Some of the calculations, such as betweenness, take a lot of cpu power…
uylmz
  • 1,480
  • 2
  • 23
  • 44
0
votes
1 answer

Parallel implementation of shortest path in graph_tool

I want to compute all shortest paths between each pair of nodes in an undirected weighted graph. I am currently using graph_tool.topology.shortest_distance, from the graph_tool python library, but it seems to be running in one core only. Is there a…
Rayamon
  • 304
  • 3
  • 10
0
votes
0 answers

Find map between vertex and graph tool index

I read a graph whose vertices are name of person in graph tool. It assigns its own index to each vertex. I wonder if it is possible to obtain one to one map between vertices original name and their corresponding graph tool index ?
0
votes
0 answers

How to dynamically modify certain edge weights in an EdgePropertyMap

I was wondering what the most efficient way would be to dynamically modify the weight of a selection of edges in a graph. Can I do this in a temporary way without actually modifying the propertymap ? I can see the use of filters in the…
0
votes
1 answer

Quickest way to find shortest paths from origin to all destinations in a directed weighted graph

Background I'm performing an iterative traffic assignment (ITA) on a directed weighted graph with ~12k nodes and ~25k edges. At each stage of the four iterations in ITA, I have to find the shortest path between an origin and a set of destinations…
0
votes
0 answers

expat library not found while graph-tool installation on windows 10

I'm trying to install graph-tool python library and i run ./configure in cygwin as told here: https://git.skewed.de/count0/graph-tool/-/wikis/installation-instructions#generic-instructions and I'm getting configure: error: expat library not found…
0
votes
2 answers

Why does a GraphView omit the 0th vertex?

I am using the latest version of graph_tool installed in it's own conda environment, as per the installation guide. I ran into some perplexing behavior with this library recently. When I run the following code: import graph_tool graph =…
trevorKirkby
  • 1,886
  • 20
  • 47
0
votes
0 answers

PermissionError: [Errno 13] Permission denied. Using graph-tool on Python

I have taken a look at the similar questions posted on this topic, but unfortunately I have not been able to use previous responses to solve my particular problem. What I am trying to do is use a Python package by the name of "graph-tool" on my Mac…
0
votes
1 answer

Model for generating and detecting communities in dense network

I have a complete undirected weighted graph. Think of a graph where persons are nodes and the edge (u,v,w) indicates the kind of relationship between u and v with weight w. w can take any value between 1 (doesn't know each other - hence the…
0
votes
1 answer

Error in installing graph-tool in Ubuntu 18.04

I followed the installation instructions in the website: https://git.skewed.de/count0/graph-tool/-/wikis/installation-instructions for installing graph-tool on Ubuntu 18.04, but when I write "sudo apt-get install python3-graph-tool" in the…
Narcis
  • 441
  • 1
  • 3
  • 12
0
votes
1 answer

removing vertices invalidates vertex properties in graph tool

I'm facing this little problem with graph-tool. I need to safely remove vertices with no in or out edges (with total degree==0 in practice), for this purpose I've written this little function def clean(self): v_list = [] for v in…
user54188
  • 3
  • 1
0
votes
0 answers

Customize drawing in python graph-tool

I like to draw a graph using graph-tool, where the edge weights are written to the edges. I can draw a graph, but edge weights strangely annotated: import graph_tool.all as gt g = gt.Graph(directed=True) import numpy as np import random dim = 7…
Markus
  • 578
  • 6
  • 26
0
votes
0 answers

How to generate a sequence of subgraphs using networkx or graph-tool?

How to generate a sequence of subgraphs using networkx? For example: I want to generate the following subgraph1 subgraph1 Edges: [(0,1), (0,2), (0,3), (1,2), (2,3), (3,4)] This graph has a max degree of 3 and a depth/diameter(longest path) of…
user1870400
  • 6,028
  • 13
  • 54
  • 115
0
votes
1 answer

How to get the distance from a source to all points within a maximum distance with graph-tool (using Dijkstra algorithm)

I'm trying to use graph-tool to quickly calculate the distance from a source vertex to all vertices within a maximum distance, using a cost property that I have available for each edge. I suppose I have to use the dijkstra_search function, but how…
0
votes
1 answer

python cannot import graph-tool after installing it on a mac using brew (homebrew)

I used homebrew to install graph-tool on a macOS 10.14 using the command brew install graph-tool, but I cannot import it in python (that is installed through anaconda in /opt/anaconda3/bin/python). How can I make Python able to import graph-tool?
Ohm
  • 2,312
  • 4
  • 36
  • 75