Subject: [Boost-bugs] [Boost C++ Libraries] #9368: Generalize edge weight types usable in prim_minimum_spanning_tree
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-12 04:33:32
#9368: Generalize edge weight types usable in prim_minimum_spanning_tree
-------------------------------------+----------------------
Reporter: lgtorres42@⦠| Owner: jewillco
Type: Patches | Status: new
Milestone: To Be Determined | Component: graph
Version: Boost Development Trunk | Severity: Problem
Keywords: bgl, prim, weight |
-------------------------------------+----------------------
The current implementation of prim_minimum_spanning_tree makes the
following assumptions about edge weight types:
+ weights have the less-than (<) operator defined
+ weight identity value is 0
+ the maximum weight value is accessible by std::numeric_limits<W>::max()
I've attached a patch that removes these requirements of edge weights by
allowing users to use the distance_compare, distance_zero, and
distance_inf named parameters. These parameters are passed to the
dijsktra_shortest_paths() call that underlies the
prim_minimum_spanning_tree function.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9368> 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:14 UTC