|
Boost Users : |
Subject: Re: [Boost-users] question about vertex_index_t property of graph
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2015-07-24 01:23:16
>________________________________
> From: breadbread1984 <breadbread1984_at_[hidden]>
>To: boost-users_at_[hidden]
>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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net