|
Boost Users : |
From: Anton A. Patrushev (anton_at_[hidden])
Date: 2007-08-02 02:49:38
Hi,
How to initialize edge index map?
I tried following:
typedef adjacency_list<vecS, vecS, directedS, Vertex, Edge>
graph_t;
graph_traits<graph_t>::edge_iterator ei, ei_end;
graph_t graph(num_nodes);
......
adding edges
......
for(tie(ei, ei_end) = edges(graph); ei != ei_end; ++ei, ++index)
put(edge_index, graph, *ei, index);
But I always get a compilation error:
/usr/include/boost/property_map.hpp: In function âvoid boost::put(const
boost::put_get_helper<Reference, PropertyMap>&, K, const V&) [with
PropertyMap = boost::adj_list_edge_property_map<boost::directed_tag,
boost::detail::error_property_not_found,
boost::detail::error_property_not_found&, unsigned int,
boost::property<boost::edge_bundle_t, Edge, boost::no_property>,
boost::edge_index_t>, Reference =
boost::detail::error_property_not_found&, K =
boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, V =
int]â:
/usr/include/boost/graph/detail/adjacency_list.hpp:1667: instantiated
from âvoid boost::put(Property, boost::adj_list_helper<Config, Base>&,
const Key&, const Value&) [with Config =
boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS,
boost::vecS, boost::directedS, Vertex, Edge, boost::no_property,
boost::listS>, boost::vecS, boost::vecS, boost::directedS,
boost::property<boost::vertex_bundle_t, Vertex, boost::no_property>,
boost::property<boost::edge_bundle_t, Edge, boost::no_property>,
boost::no_property, boost::listS>::config, Base =
boost::directed_graph_helper<boost::detail::adj_list_gen<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, Vertex, Edge, boost::no_property, boost::listS>, boost::vecS, boost::vecS, boost::directedS, boost::property<boost::vertex_bundle_t, Vertex, boost::no_property>, boost::property<boost::edge_bundle_t, Edge, boost::no_property>, boost::no_property, boost::listS>::config>, Property = boost::edge_index_t, Key = boost::detail::edge_desc_impl<boost::directed_tag, unsigned int>, Value = int]â
shooting_star_boost_wrapper.cpp:266: instantiated from here
/usr/include/boost/property_map.hpp:319: error: no match for âoperator=â
in â((const boost::adj_list_edge_property_map<boost::directed_tag,
boost::detail::error_property_not_found,
boost::detail::error_property_not_found&, unsigned int,
boost::property<boost::edge_bundle_t, Edge, boost::no_property>,
boost::edge_index_t>*)((const
boost::adj_list_edge_property_map<boost::directed_tag,
boost::detail::error_property_not_found,
boost::detail::error_property_not_found&, unsigned int,
boost::property<boost::edge_bundle_t, Edge, boost::no_property>,
boost::edge_index_t>&)((const
boost::adj_list_edge_property_map<boost::directed_tag,
boost::detail::error_property_not_found,
boost::detail::error_property_not_found&, unsigned int,
boost::property<boost::edge_bundle_t, Edge, boost::no_property>,
boost::edge_index_t>*)(&
pa))))->boost::adj_list_edge_property_map<Directed, Value, Ref, Vertex,
Property, Tag>::operator[] [with Directed = boost::directed_tag, Value =
boost::detail::error_property_not_found, Ref =
boost::detail::error_property_not_found&, Vertex = unsigned int,
Property = boost::property<boost::edge_bundle_t, Edge,
boost::no_property>, Tag = boost::edge_index_t](k) = vâ
/usr/include/boost/pending/detail/property.hpp:21: note: candidates are:
boost::detail::error_property_not_found&
boost::detail::error_property_not_found::operator=(const
boost::detail::error_property_not_found&)
I really can't get through all these template parameters :(
Please, tell me how to initialize this map properly!
Thanks,
Anton.
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