[BGL] Why there is no special handler for "discover_source_vertex" event in BFS visitor?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[BGL] Why there is no special handler for "discover_source_vertex" event in BFS visitor?

Dmitry Bufistov
Hi there!
Current implementation calls
vis.discover_vertex(s, g);
at this point, the same function being called for all others discovered
vertices. I have one small problem wich could be nicely solved with such
special  handler and I believe that there are others when such handler
could be usefull.
Any suggestings why things is going exacly in this way?
Best regards,
--dima

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [BGL] Why there is no special handler for "discover_source_vertex" event in BFS visitor?

Janusz Piwowarski
Dmitry wrote:
> Hi there!
> Current implementation calls
> vis.discover_vertex(s, g);
> at this point, the same function being called for all others
> discovered vertices. I have one small problem wich could be nicely
> solved with such special  handler and I believe that there are others
> when such handler could be usefull.
> Any suggestings why things is going exacly in this way?

You know the source vertex when you call bfs, don't you? Is it not enough?
If not, you can use the simple boolean flag to determine whether the vertex
is first or not.

--
Regards,
Janusz

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [BGL] Why there is no special handler for "discover_source_vertex" event in BFS visitor?

Dmitry Bufistov
Janusz Piwowarski wrote:

> Dmitry wrote:
>
>>Hi there!
>>Current implementation calls
>>vis.discover_vertex(s, g);
>>at this point, the same function being called for all others
>>discovered vertices. I have one small problem wich could be nicely
>>solved with such special  handler and I believe that there are others
>>when such handler could be usefull.
>>Any suggestings why things is going exacly in this way?
>
>
> You know the source vertex when you call bfs, don't you? Is it not enough?
> If not, you can use the simple boolean flag to determine whether the vertex
> is first or not.
>
Yes, it is true. It just looks a litlle bit clumsy for me.
Thanks,
Dmitry

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users