|
Boost Users : |
From: Alejandro Aragón (alex_aragon_at_[hidden])
Date: 2006-02-26 23:47:54
Hi all,
After running Kruskal's algorithm I end up with the list of the edges
that form the minimum cost. However, no new graph is created. I need
the resulting graph for further computations. How do you create a graph
from an existing one but only selecting the edges contained in the
minimum spanning tree vector? I've seen that there are some functions
to accomplish this but I couldn't find any example of how to do it:
template <class EdgeIterator, class EdgePropertyIterator>
adjacency_list(EdgeIterator first, EdgeIterator last,
EdgePropertyIterator ep_iter,
vertices_size_type n,
vertices_size_type m = 0,
const GraphProperty& p = GraphProperty())
The existing graph has properties in edges and vertices that I also need
to keep. Can anyone help? Thank you all,
A.Aragon
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