Opened 7 years ago
Closed 6 years ago
#11742 closed Bugs (fixed)
lengauer_tarjan_dominator_tree: doesn't respect indexMap parameter
Reported by: | Owned by: | Jeremiah Willcock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | graph |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The more complex version of lengauer_tarjan_dominator_tree
, as described in the BGL documentation, takes a parameter indexMap
which is to be used as the index map of the graph.
However, if you look at the code for lengauer_tarjan_dominator_tree_without_dfs
(which is called by the lengauer_tarjan_dominator_tree
function), the indexMap
argument is not used, and instead the dominator_visitor
just uses get(vertex_index, g)
explicitly when constructing its internal property maps.
This means that graphs that do not have a vertex_index
property can't use the algorithm.
I believe the correct fix is to pass the provided index map into the dominator_visitor
constructor, and use it when constructing the other maps held by the visitor.
Change History (2)
comment:1 by , 7 years ago
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Just pushed your PR, thanks for the patch!
I have created a pull request on github for boostorg/graph with a small patch that addresses this issue here:
https://github.com/boostorg/graph/pull/49.