Boost logo

Boost Users :

Subject: Re: [Boost-users] the stability of breadth_first_visit in BGL
From: Nick Edmonds (nicholas.g.edmonds_at_[hidden])
Date: 2015-07-14 14:59:29

The answer here depends on what you mean by serialized and deserialized.
The Graphviz reader/writer for example doesn't preserve vertex indices so
you may get different iteration orders if you run BFS on a graph, write it
to Graphviz, read it back in, and run BFS again. At least I remember being
bitten by this and writing special handling to use stable node ids rather
than vertex indices at some point, YMMV depending on version and use case.
If you want stable iteration orders across (de)serialization events, make
sure that whatever serialization you're using ensures that the graph
constructed has consistent vertex indices.

On Tue, Apr 28, 2015 at 1:50 PM, Marcin Zalewski <marcin.zalewski_at_[hidden]>

> I think it should be stable. Do you see any results to the contrary?
> On Tue, Apr 28, 2015 at 9:40 AM breadbread1984 <breadbread1984_at_[hidden]>
> wrote:
>> I am wondering if breadth_first_visit can always get the same sequence of
>> vertex no matter whether the graph is serialized and deserialized again.
>> Thx
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at