Boost logo

Boost Users :

From: aitor (aitors2005_at_[hidden])
Date: 2006-09-22 04:26:09


Hello,

in my project i need to compute the maximum spanning tree of an
undirected weighted graph. One possible solution is to could
iteratively convert each weight wij to 1/wij and apply
prim_minimum_spanning_tree algorithm over it.

However, i wonder if i could slightly change the
prim_minimum_spanning_tree algorithm to a prim_maximum_spanning_tree
function by changing only the compare predicate (in line 39 of
prim_minimum_spanning_tree.hpp) from

std::less<W> compare;

to

std::greater<W> compare;

Wold then the function compute a maximum spanning tree ? Or am i
missing something important ?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net