views:

24

answers:

1

I have a graph with multiple edge weightings stored as

namespace boost {
    enum edge_weightvector_t {
        edge_weightvector = 1337
    };
    BOOST_INSTALL_PROPERTY(edge, weightvector);
}

typedef boost::adjacency_list<
    boost::vecS,
    boost::vecS,
    boost::undirectedS,
    boost::no_property,
    boost::property<boost::edge_weightvector_t, std::vector<int> >
> graph_t;

The weightings are all pushed onto the vector.

Now I want to call the prim_minimum_spanning_tree() function on the graph, with the first elements in the vector used as weightings.

How can I perform a correct function call?

A: 

I've did it now by first copying the desired weightings to an additional property, then running the algorithm and copying back afterwards. It is ugly, but it does the trick in my case.

Etan