$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [Graph] source vertex colour at start of BFS or DFS
From: Jeremy Murphy (jeremy.william.murphy_at_[hidden])
Date: 2015-01-24 05:11:52
Hi,
I'm wondering, why do the BFS and DFS algorithms not inspect the colour of
the source vertices given to them? If a source vertex is already black,
shouldn't the search effectively be a no-op? Currently the source vertex is
'discovered' and coloured grey regardless of its previous colour.
I know it might seem weird to pass a black vertex as the source, but I
guess I see it as similar to passing an empty range to an algorithm: it's
valid but nothing happens.
Thanks, cheers.
Jeremy