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
2
votes
0 answers

MacOS Sierra - brew installs graph-tool with openmp disabled

Running brew install graph-tool on MacOs 10.13.4 does install graph-tool but openmp seems disabled. Am I missing a brew option to have openmp enabled? I did run brew install libomp prior to installing graph-tool. Python 3.7.2 (default, Dec 27 2018,…
2
votes
1 answer

Graph-tool installed, Import.all does not work

I have installed graph-tool: brew --prefix graph-tool '/usr/local/opt/graph-tool but when trying to import it: Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on…
2
votes
2 answers

Finding all paths between source and target in graph-tool, return edges instead of vertices

Stack Overflow! I have a directed graph and need to find all paths between a source and target vertex. Between several vertices, there are multiple edges. Using graph-tool, one may suggest using graph_tool.topology.all_paths(g, source, target),…
Espenol
  • 21
  • 3
2
votes
2 answers

BGL: Get initial direction of edge in undirected graph

In an undirected BGL graph: Can I get the information whether an edge (u,v) == (v,u) was initially added as (u,v) or as (v,u)? Background: I created a graph using Pythons graph-tool library which internally uses Boost Graph Library (BGL). Each…
Leo
  • 71
  • 1
  • 4
2
votes
2 answers

How can I retrieve a selected vertex in graph-tool?

I would like to be able to retrieve the vertex_index of a currently selected vertex (the vertex currently having the mouse over it). I have not found this question asked in StackOverflow, nor this information mentioned in the official graph-tool…
2
votes
1 answer

What installation dependencies/options are needed for graph-tool to include draw_hierarchy?

I've installed graph-tool 2.26 on ubuntu 14.04, python 3.5.4. I can use graph-tool, but it seems incomplete. For example I've seen this error: AttributeError: module 'graph_tool.draw' has no attribute 'draw_hierarchy' Before installing, I made sure…
jpobst
  • 3,491
  • 2
  • 25
  • 24
2
votes
1 answer

Graph-tool installed but can't be imported

I installed Graph-tool via homebrew $ brew --prefix graph-tool /usr/local/opt/graph-tool But I still get error when trying to import it. I have read related posts How to let python3 import graph-tool installed by Homebrew? and tried all the…
Nelly Kong
  • 279
  • 1
  • 2
  • 18
2
votes
1 answer

graph_tool: access vertex/edge property faster

I'd like to speed up the vertex/edge property access process. For vertex property access, I find one way to optimize however for edge property access, it is not so trivial to me. The idea for vertex property is to modify the internal array (a…
xiaohan2012
  • 9,870
  • 23
  • 67
  • 101
2
votes
1 answer

Generating graph-tool graph from Pandas DataFrame or CSV

I've started using graph-tool, hoping it would be a python library that will allow me to analyze large graphs (~8M vertices, ~22M edges, in a Pandas DataFrame / CSV). 'source' and 'target' columns are user ids for a certain digital service. I…
Optimesh
  • 422
  • 1
  • 6
  • 18
2
votes
0 answers

Install/Build graph-tool with python v3.6.0 (non-standard lib path)

after now trying to build graph-tool for one day its time to ask for some help. My problem: I dont get graph-tool installed for the right python version on Ubuntu 16.04 LTS. As mentioned in the install guide: "sudo apt-get install…
JustSomeone
  • 171
  • 2
  • 12
2
votes
2 answers

Import txt file in graph-tool

I have a directed, weighted network stored in a txt file as a list of 3 elements: node1 node2 weight node1 node3 weight ... So for example the triplet: 1 10 50 means that I got an edge between node 1 and node 10 with weight 50. Can someone please…
2
votes
0 answers

How to install graph-tool

I met problem when I "make" in graph-tool-2.19. Part of the problem is shown in the link. Do you know how to deal with it? problem 1 problem 2
Sirui Li
  • 203
  • 1
  • 3
  • 9
2
votes
2 answers

error installing graphtool python

I ma trying to isntall graphtool on centos but I receive an error. This is what I have tried: (python_2.7_numerical) [lpuggini@machinelearn-1 ~]$ pip install git+https://github.com/count0/graph-tool Collecting…
Donbeo
  • 17,067
  • 37
  • 114
  • 188
2
votes
2 answers

Find minimum value of edge property for all edges connected to a given node

I have a network where each of my edges is labelled with a date. I want to now also label my vertices so that each vertex has a date assigned to it corresponding to the minimum date of all edges incident and emanating from it. Is there an inbuilt…
P-M
  • 1,279
  • 2
  • 21
  • 35
2
votes
1 answer

Can graph_tool sort nodes?

I have a DAG network and want to visualize it in python. I chose graph_tool but any other library is fine. I could not find a way to influence a node's position else then to create connections. Is there a way to sort nodes so that I do not need to…
Pixdigit
  • 80
  • 1
  • 11