Boost C++ Libraries: Ticket #9368: Generalize edge weight types usable in prim_minimum_spanning_tree https://svn.boost.org/trac10/ticket/9368 <p> The current implementation of prim_minimum_spanning_tree makes the following assumptions about edge weight types: </p> <p> + weights have the less-than (&lt;) operator defined </p> <p> + weight identity value is 0 </p> <p> + the maximum weight value is accessible by std::numeric_limits&lt;W&gt;::max() </p> <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9368 Trac 1.4.3 lgtorres42@… Tue, 12 Nov 2013 04:34:13 GMT attachment set https://svn.boost.org/trac10/ticket/9368 https://svn.boost.org/trac10/ticket/9368 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">prim-patch.patch</span> </li> </ul> <p> general edge weight patch to BGL prim's minimum spanning tree </p> Ticket lgtorres42@… Tue, 12 Nov 2013 04:42:54 GMT <link>https://svn.boost.org/trac10/ticket/9368#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9368#comment:1</guid> <description> <p> Note: adding this patch would require updating the Prim's documentation to reflect the new functionality. </p> </description> <category>Ticket</category> </item> </channel> </rss>