void set_all_weights(const std::vector<weight_t>& ws) { #ifndef NDEBUG if (num_edges(_g) != ws.size()) std::cout << "param errors: " << num_edges(_g) << " whereas " << ws.size() << " provided" <<std::endl; #endif assert(num_edges(_g) == ws.size()); size_t k = 0; BGL_FORALL_EDGES_T(e, _g, graph_t) _g[e].set_weight(ws[k++]); }
void copy_edge_property(PropertyIn p_in, PropertyOut p_out, Graph& g) { BGL_FORALL_EDGES_T(e, g, Graph) put(p_out, e, get(p_in, g)); }