question about vertex_index_t property of graph
I am using boost graph library. I want to know whether the value of vertex_index_t property is assigned and updated automatically? If I serialize a graph to a file and deserialize it, will the value of vertex_index_t property remain?
________________________________ From: breadbread1984
To: boost-users@lists.boost.org Sent: Thursday, July 23, 2015 6:38 PM Subject: [Boost-users] question about vertex_index_t property of graph I am using boost graph library. I want to know whether the value of vertex_index_t property is assigned and updated automatically? If I serialize a graph to a file and deserialize it, will the value of vertex_index_t property remain?
For those graph types where it is built-in (for example, when you use vecS as vertex container), it will be updated automatically. This can cause problems if you remove vertices, though, since the vertices after it will automatically be renumbered. It appears that serialization preserves vertex order, which would also mean that it preserves vertex index values. If you define your own vertex_index property for a graph type that does not have one, it will be serialized and deserialized automatically, but would not be updated automatically. -- Jeremiah Willcock
participants (2)
-
breadbread1984
-
Jeremiah Willcock