Hi Tiago,
Thanks for the blazing fast answer!
It will sure do the job. I can't find it in the documentation though
(it's accessible online via ipython autocompletion and magic '?', but
doesn't appear on your web site).
Cheers,
Guillaume
Le 17/12/2012 11:14, Tiago de Paula Peixoto a écrit :
On 12/17/2012 11:11 AM, Guillaume Gay wrote:
Hi list.
I am using graph-tool to model an /apical junctions/ network, based on the model by
Farhadifar et al.
<http://www.sciencedirect.com/science/article/pii/S0960982207023342>. In short,
it corresponds to the outer surface of the cells in a particular region of the
embryo, where each cell is represented by a polygon. Topology of the network changes
due to cell division and cell death.
The physical model involves the local minimization of an energy depending on
the local geometry.
I got a working model, but the energy optimization is time consuming. I think
that this is due to the way I compute the components of the vector formed by
each edge of the graph, by iterating over the edges., eg:
|for edge in graph.edges():
v0, v1 = edge.source(), edge.target()
deltax[edge] = x[v1] - x[v0]
deltay[edge] = y[v1] - y[v0]|
This is further complicated (to a little extent) by periodic conditions to the
coordinate systems, and some other details, but I think this is the core issue.
I have the feeling I can do better, perhaps by using the adjacency matrix? This
would be particularly interesting as the graph topology doesn't change for a
given optimization.
Hi Guillaume,
Take a look at the edge_difference() function, since I think it does
what you want, and should be significantly faster.
Cheers,
Tiago
_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool
_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool