#include #include #include "member_property_map.h" struct edge { int id; float cost; }; int main() { typedef boost::vector_property_map bundle_map_type; typedef blink::member_property_map cost_map_type; typedef blink::member_property_map id_map_type; bundle_map_type bundle_map; cost_map_type cost_map(bundle_map, &edge::cost); id_map_type id_map(bundle_map, &edge::id); bundle_map[0].id = 1; bundle_map[1].id = 2; bundle_map[2].id = 3; bundle_map[0].cost = 1.1f; bundle_map[1].cost = 1.2f; bundle_map[2].cost = 1.3f; id_map[3] = 4; cost_map[3] = 1.4f; std::cout << id_map[0] << " " << cost_map[0] << std::endl; std::cout << id_map[1] << " " << cost_map[1] << std::endl; std::cout << id_map[2] << " " << cost_map[2] << std::endl; std::cout << bundle_map[3].id << " " << bundle_map[3].cost << std::endl; return 0; }