[Boost-bugs] [Boost C++ Libraries] #11742: lengauer_tarjan_dominator_tree: doesn't respect indexMap parameter

Subject: [Boost-bugs] [Boost C++ Libraries] #11742: lengauer_tarjan_dominator_tree: doesn't respect indexMap parameter
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-10-21 00:51:42


#11742: lengauer_tarjan_dominator_tree: doesn't respect indexMap parameter
---------------------------------------------+----------------------
 Reporter: Justin Viiret <justin.viiret@…> | Owner: jewillco
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: graph
  Version: Boost 1.59.0 | Severity: Problem
 Keywords: |
---------------------------------------------+----------------------
 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11742>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC