Ah, thank you very much for the clarification! I'm gonna do some testing on that tomorrow.
Maybe you could add that piece of information to the documentation. Esp. "they keep a direct pointer to the graph view that created them" Best regards, Stephan -- Sent from my mobile device. Please excuse my brevity. Am 17. November 2021 19:30:35 MEZ schrieb Tiago de Paula Peixoto <[email protected]>: >Am 15.11.21 um 17:55 schrieb Monecke, Stephan: >> Hi together! >> >> >> >> I just noticed that vertices that had been saved within an external list are >> not being updated when filtering the graph: >> >> >> >>> G.set_edge_filter( G.edge_properties[ 'e_isbus'], inverted=True) >> >>> G.set_vertex_filter(G.vertex_properties['v_isbus'], inverted=True) >> >> >>> print( [ int(n) for n in node.all_neighbors() ] ) >> [101, 22, 265, 496, 518, 22, 265, 496, 101, 518] >> >> >>> print( [ int(n) for n in G.vertex( int(node) ).all_neighbors() ] ) >> [101, 22, 265, 22, 265, 101] >> >> >> Did I miss something or is this a bug? > >I don't view this as a bug. Vertex descriptors are supposed to be ephemeral >objects that you create in an ad hoc way. For performance reasons they keep a >direct pointer to the graph view that created them. If you want to store >vertices and look them up, it's better just to store their index, and get a >descriptor at the time you need it. > _______________________________________________ graph-tool mailing list -- [email protected] To unsubscribe send an email to [email protected]
