Boost logo

Boost Users :

From: Val Samko (boost_at_[hidden])
Date: 2004-04-04 10:39:48


Hi,

Why doesn't the following code compile (VC++ 7.1, g++ 3.3.3, boost 1.31.0) ?
========================================================================
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/johnson_all_pairs_shortest.hpp>
int main()
{
        using namespace boost;
        typedef adjacency_list<vecS, vecS, bidirectionalS,
                                                        boost::property<boost::vertex_index_t, int,
                                                        boost::property<boost::edge_weight_t, int> >
> Graph;
        Graph g;
        int distance_matrix[100][100];
        johnson_all_pairs_shortest_paths(g, distance_matrix);
}
========================================================================
but it compiles, if we pass the edge weight map (composed from
std::map<edge_descriptor, int>) as a named parameter to
johnson_all_pairs_shortest_paths ?

Also, why do
johnson_all_pairs_shortest_paths(g, distance_matrix);
and
johnson_all_pairs_shortest_paths(g, distance_matrix, weight_map(get(vertex_index, g)));
produce completely different compile time errors?

Finally, is it possible to use
johnson_all_pairs_shortest_paths
with adjacency_list<mapS, mapS, ...> ?
According to the documentation, this should be possible, but this
just does not compile.

-- 
 Val Samko                          http://val.digiways.com/

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