Hi all,

I'm using graph-tool to represent a living tissue. The tissue grows and changes shape through successive local changes.

For each of those changes, I need to optimize graph energy (as defined by a non trivial relation between graphs edge and vertices coordinates in 3D).

My question is the following:

Before the optimization, is it better to

 *

   Take a GraphView of the graph masked by filters:

   |   local_view = gt.GrahView(graph, vfilt=is_local_v, efilt=is_local_e)
      ###  ... optimize on local_view ...|

 *

   Work on the filtered graph:

   |   graph.set_vertex_filter(is_local_v)
      graph.set_vertex_filter(efilt=is_local_e)
      ### optimize on local
      graph.set_vertex_filter(None)
      graph.set_vertex_filter(None)|

 *

   Do a copy of the local graph,

   |   local_view = gt.GrahView(graph, vfilt=is_local_v, efilt=is_local_e)
       local = Graph(local_view, prune=True)
      ### ...optimize on local...
      graph.set_vertex_filter(is_local_v)
      graph.set_vertex_filter(efilt=is_local_e)
      for  key, propin  graph.vertex_properties:
         prop.fa = local.vertex_properties[key].fa|

For now, I am doing it the second way... I suspect it's not the best, but don't have clue on which of the others is better. Any comments welcome!

Thanks

Guillaume

_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to