graph-tool

graph-tool crahes on import

女生的网名这么多〃 提交于 2019-12-25 16:24:18
问题 Using Python 2.7 I try to import graph-tool: from graph_tool.all import * Each time I execute the above command the following error is returned and Python crashes. dyld: lazy symbol binding failed: Symbol not found: __ZN5boost6python6detail11init_moduleEPKcPFvvE Referenced from: /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so Expected in: flat namespace dyld: Symbol not found: __ZN5boost6python6detail11init_moduleEPKcPFvvE Referenced from: /usr/local/lib/python2.7/site

Load an edge-list into graph-tool

二次信任 提交于 2019-12-24 08:09:47
问题 I want to load an edge-list into graph-tool. The vertex-indices in my list are not sequential, so I would like them to be automatically added as vertex_properties. As far as I understand this should be done with add_edge_list but I find that the vertex_property "name" is not created. On the other hand, load_graph_from_csv does work: from graph_tool.all import * import numpy as np import pandas as pd edge_list = [[1,7,1],[7,4,5],[1,4,3]] G = Graph(directed=False) G.ep["length"] = G.new_edge

python graph-tool access vertex properties

安稳与你 提交于 2019-12-22 13:52:35
问题 For my current project I want to use the graph-tool library since they claim being the fastest: https://graph-tool.skewed.de/performance. I have some algorithms (shortest path, etc.) to run on really large networks, so the faster the better! First question: Is this claim 'being the fastest' true? ;) While trying to build a graph-tool graph fitting my needs, I figured out that its not possible to access vertex properties in a efficient way. Maybe I missed something? My question is now, can the

All shortest paths using graph_tool

心已入冬 提交于 2019-12-22 12:58:21
问题 I was wondering if there is a built in function in graph_tool that can be used to find all shortest paths from node s to node t. If not, is there any way that I can use shortest_distance() (in module graph_tool.topology), or shortest_path() (in module graph_tool.topology) somehow (or any other built-in function)to compute all the shortest path instead of only one of them, efficiently (I am working with a graph that has around half a million nodes). 回答1: There is no such function in graph-tool

How to install graph-tool for Anaconda Python 3.5 on linux-64?

南笙酒味 提交于 2019-12-21 12:37:33
问题 I'm trying to install graph-tool for Anaconda Python 3.5 on Ubuntu 14.04 (x64), but it turns out that's a real trick. I tried this approach, but run into the problem: The following specifications were found to be in conflict: - graph-tool Use "conda info <package>" to see the dependencies for each package. Digging through the dependencies led to a dead-end at gobject-introspection So I tried another approach: Installed boost with conda, then tried to ./configure, make, and make install graph

Permanently adding to DYLD_LIBRARY_PATH on MAC causes X11 errors

落花浮王杯 提交于 2019-12-19 10:25:12
问题 I am using Python 2.7 and am trying to import graph_tool, and it seems that my libboost_thread-mt.dylib is located in /opt/local/lib rather than /usr/local/lib. If I start an X11 terminal and type in export DYLD_LIBRARY_PATH='/opt/local/lib' then Python successfully imports graph_tool. On the other hand, if I add export DYLD_LIBRARY_PATH='/opt/local/lib':$DYLD_LIBRARY_PATH to ~/.bash_profile , X11 stops working. I am really confused as to what is happening here. Why can't I add /opt/local/lib

configure: error: CGAL library not found

断了今生、忘了曾经 提交于 2019-12-12 13:32:25
问题 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 decent progress, until the CGAL Library could not be found. Note: to comply with the Anaconda instructions, I installed anaconda3 and created a new conda environment (named py36env ) to conda install all the required packages (packages that must also

graph-tool - k-shortest path - boost::coroutine was not found at compile-time

被刻印的时光 ゝ 提交于 2019-12-12 02:57:46
问题 I am trying to find the k shortest paths between two nodes in my directed graph. To this end I run the following snippet of code: g = load_graph('graph.xml') source = find_vertex(g,g.vp.xrn, '774123') source = source[0] target = find_vertex(g,g.vp.xrn,'636131') target = target[0] for path in all_shortest_paths(g,source,target): print path This returns the following error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/graph_tool

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

本小妞迷上赌 提交于 2019-12-11 12:46:18
问题 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 that all the dependencies (found here https://git.skewed.de/count0/graph-tool/wikis/installation-instructions#manual-compilation) were installed, but I may have run into a situation where something was installed but not found/properly linked during

Subclassing Graph from the graph_tool package

社会主义新天地 提交于 2019-12-11 04:57:48
问题 I am attempting to sub-class Graph from the graph_tool package for some graph analysis in Python (so that I can generate some of my own functions, but still use Graph_Tool's functions as well), and I cannot seem to use graph_tool 's graph generator methods. I start by importing my classes: import graph_tool.all as gt import numpy.random as np np.seed(42) I've tried various versions of the __init__ method: Build a graph from scratch. This works, but I'd prefer not to use this, because graph