Vertex pointer not updated on graph filtering

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?

Thanks a lot for any ideas!

Stephan

attachment.html (1.17 KB)

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.

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