From: LoÃ¯c Joly (loic.joly_at_[hidden])
Date: 2006-07-24 17:58:35
Daniel Mitchell a Ã©crit :
> I'm not sure I'd call that a bug; after all, the graph must contain at least a
> source vertex for DFS to be sensible. I would say that having a non-empty
> graph is a pre-condition for calling DFS.
It may be so for depth-first-search, I'm not a domain expert at all. In
that case, maybe just adding this requirement to the doc would be enough.
However, for topological_sort, this goes against my expectations.
std::sort on an empty STL sequence may be useless, it is however defined
and does the right thing. And it allows to write generic code easily,
without requiring the user to check anything before. I do not see any
reason why topological_sort would not behave the same.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk