Advertisement
gladiusmaximus

Dijkstra code2

May 22nd, 2014
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.64 KB | None | 0 0
  1. ---CODE---
  2. typedef long Weight;
  3. typedef property<edge_weight_t, Weight> EdgeWeightProperty;
  4. typedef boost::adjacency_list<listS, vecS, directedS, allow_parallel_edge_tag, EdgeWeightProperty> Graph;
  5. typedef boost::graph_traits<Graph>::vertex_descriptor Vertex;
  6. typedef boost::graph_traits<Graph>::vertex_iterator VertexIterator;
  7. typedef boost::graph_traits<Graph>::edge_descriptor Edge;
  8. typedef boost::property_map<Graph, boost::vertex_index_t>::type IndexMap;
  9.  
  10. typedef boost::property_map<Graph, boost::vertex_name_t>::type NameMap; // This line causes an error
  11.  
  12. ---ERROR---
  13. In file included from /usr/include/boost/graph/adjacency_list.hpp:246:0,
  14.                  from north.cpp:8:
  15. /usr/include/boost/graph/detail/adjacency_list.hpp: In instantiation of 'struct b
  16. oost::vec_adj_list_any_vertex_pa::bind_<boost::vertex_name_t, boost::adjacency_li
  17. st<boost::listS, boost::vecS, boost::directedS, boost::allow_parallel_edge_tag, b
  18. oost::property<boost::edge_weight_t, long int> >, boost::allow_parallel_edge_tag>
  19. ':                                                                              
  20. /usr/include/boost/graph/detail/adjacency_list.hpp:2591:12:   required from 'stru
  21. ct boost::detail::vec_adj_list_choose_vertex_pa<boost::vertex_name_t, boost::adja
  22. cency_list<boost::listS, boost::vecS, boost::directedS, boost::allow_parallel_edg
  23. e_tag, boost::property<boost::edge_weight_t, long int> >, boost::allow_parallel_e
  24. dge_tag>'                                                                      
  25. /usr/include/boost/graph/detail/adjacency_list.hpp:2717:12:   required from 'stru
  26. ct boost::vec_adj_list_vertex_property_selector::bind_<boost::adjacency_list<boos
  27. t::listS, boost::vecS, boost::directedS, boost::allow_parallel_edge_tag, boost::p
  28. roperty<boost::edge_weight_t, long int> >, boost::allow_parallel_edge_tag, boost:
  29. :vertex_name_t>'                                                                
  30. /usr/include/boost/graph/properties.hpp:217:12:   required from 'struct boost::de
  31. tail::vertex_property_map<boost::adjacency_list<boost::listS, boost::vecS, boost:
  32. :directedS, boost::allow_parallel_edge_tag, boost::property<boost::edge_weight_t,
  33. long int> >, boost::vertex_name_t>'                                            
  34. /usr/include/boost/graph/properties.hpp:228:10:   required from 'struct boost::pr
  35. operty_map<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boo
  36. st::allow_parallel_edge_tag, boost::property<boost::edge_weight_t, long int> >, b
  37. oost::vertex_name_t>'                                                          
  38. north.cpp:76:57:   required from here
  39. /usr/include/boost/graph/detail/adjacency_list.hpp:2540:29: error: forming refere
  40. nce to void                                                                    
  41.          typedef value_type& reference;
  42.                              ^
  43. /usr/include/boost/graph/detail/adjacency_list.hpp:2541:35: error: forming refere
  44. nce to void                                                                    
  45.          typedef const value_type& const_reference;
  46.                                    ^
  47. /usr/include/boost/graph/detail/adjacency_list.hpp:2544:55: error: forming refere
  48. nce to void                                                                    
  49.            <Graph, Graph*, value_type, reference, Tag> type;
  50.                                                        ^
  51. /usr/include/boost/graph/detail/adjacency_list.hpp:2546:67: error: forming refere
  52. nce to void                                                                    
  53.            <Graph, const Graph*, value_type, const_reference, Tag> const_type;
  54.                                                                    ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement