Boost logo

Boost Users :

Subject: [Boost-users] BGL using the VertexIndexMap with VertexList=listS
From: khaled (khaledhamidouche_at_[hidden])
Date: 2010-03-05 12:30:46


Hello

I'm using the BGL and wandering to use dijkstra_short_path

I this code

struct vertex1
{
     int step;
     int node;
     int MPI;
     int OMP;
     int acc;
    };

struct edge1
{
    double cost;
    };
   
typedef boost::adjacency_list<
    boost::listS, boost::listS, boost::directedS,
   vertex1, edge1> Graph;
 

Graph g;

 
 
std::vector<double> distances(num_vertices(g));

dijkstra_shortest_paths(g, from,
      weight_map(get(&edge1::cost, g))
      .distance_map(make_iterator_property_map(distances.begin(),
                                               get(vertex_index, g))));

I have a problem with the VertexIndexMap (I guess is this the problem
:) )
as I'm using a adjacenty_list with VertexList=listS does not have an
internal vertex_index property.
So, Please can you help me to fix this ?
what is the VertexIndexMap to be used with the listS VertexList ??

Thanks

-- 
K.H

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