Range-Based Graph Search in D (blog post)
Peter Alexander
peter.alexander.au at gmail.com
Sat Jan 11 01:51:55 PST 2014
On Thursday, 9 January 2014 at 22:53:02 UTC, qznc wrote:
> For the visitation API design: Your map approach (bool[Vertex]
> m_visited) is probably the most generic one.
>
> A variant, where the nodes store the flag internally is more
> efficient, though.
Unless the graph is infinite ;-)
But yes, for most graphs that would likely be more efficient than
a hash lookup. I'll keep note of that. Thanks!
More information about the Digitalmars-d-announce
mailing list