template <typename vertex> void weighted_graph<vertex>::add_edge(const vertex& u, const vertex& v, const int& weight) {
std::vector<std::pair<int,int> > weight_value;
weight_value[u].push_back(make_pair(v,weight));
weight_value[v].push_back(make_pair(u,weight));
}
我在class private里面创建了std::vector<std::pair<int,int>
守候你守候我
相关分类