[graph-tool] GraphView with lambda function
gerion.entrup at flump.de
Mon Jan 6 13:53:58 CET 2020
the documentation describes that GraphView can be given a unary function
to filter vertices or edges.
I have tried that and it seems to fail. My GraphView has not the
expected vertices and edges.
However, my assumption is that the filter is only evaluated one time
Let me make an example:
g = graph_tool.Graph()
a = graph_tool.GraphView(g, vfilt=...)
do_stuff_with(a) # <- here a does not contain any data
>From the documentation, it seems that graph_tool constructs a property
from the filter function and uses this for filtering (therefore also
needing O(N)), but fill this property only on construction. Can you
mention this in the documentation as a hint or warning?
Maybe also a recalculate function for GraphView is meaningful that
evaluates the lambda function again.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 659 bytes
Desc: This is a digitally signed message part.
More information about the graph-tool