Thanks for the quick response Thiago!
In this code all the edges and vertices are created by graph-tool and the
result is something much faster...
is this the best I can do?
It's somewhat annoying to have to keep track of the vertices that will be
created like this:
def
On 27.04.2015 16:29, Tiago de Paula Peixoto wrote:
On 27.04.2015 00:31, desert_rain wrote:
Hi,
I am using graph-tool for my research, thanks for creating graph-tool.
I need to calculate average values from vertex and edge properties.
Property types are vectordouble. When I use the
I posted code with missing lines...
here is the good code:
#!/usr/bin/python
Create graphs in networkx and graph-tool.
import networkx as nx
from graph_tool.all import *
import igraph
from itertools import combinations
def graph_tool_create():
Create a graph_tool graph given a list of
I've been using networkx to simply create a graph and check the connected
components. The bottleneck of the operation is the creation of the edges.
I've heard that graph-tool is very efficient so I've replaces the code with
a graph-tool graph.
To my surprise, the creation of a graph-tool graph
On 27.04.2015 00:31, desert_rain wrote:
Hi,
I am using graph-tool for my research, thanks for creating graph-tool.
I need to calculate average values from vertex and edge properties.
Property types are vectordouble. When I use the edge_average function,
program gives 'RuntimeError'. How
I solved this once by making a NoDupesGraph where you could add edges with
just the names of vertices .
class NoDupesGraph(Graph):
'''Add nodes without worrying if it is a duplicate.
Add edges without worrying if nodes exist '''
def __init__(self,*args,**kwargs):
Thank you alot for this quick fix. You are awesome!
--
View this message in context:
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Average-calculation-from-vector-double-property-tp4026107p4026115.html
Sent from the Main discussion list for the graph-tool project