graph-v2 icon indicating copy to clipboard operation
graph-v2 copied to clipboard

BFS: do not use a three-state map of visited vertices

Open akrzemi1 opened this issue 6 months ago • 0 comments

Currently, the breadth-first search stores a vector colors_ of a three-state (8-bit) three_colors enum. The implementation never distinguishes between the black and the gray state. This can be changed to only black-white scheme, and this way you can use one bit per vertex, and a type such us vector<bool>.

akrzemi1 avatar Jun 18 '25 21:06 akrzemi1