Commit df948de9 authored by Tiago Peixoto's avatar Tiago Peixoto

Replace some make_tuple instance with brace initializers

parent c688f9a3
......@@ -650,9 +650,9 @@ public:
gt_hash_map<std::tuple<vertex_t, int>, vector<edge_t>> ns_u, ns_v;
for(auto e : out_edges_range(u, _g))
ns_u[std::make_tuple(target(e, _g), ec[e])].push_back(e);
ns_u[{target(e, _g), ec[e]}].push_back(e);
for(auto e : out_edges_range(v, _g))
ns_v[std::make_tuple(target(e, _g), ec[e])].push_back(e);
ns_v[{target(e, _g), ec[e]}].push_back(e);
for(auto& kv : ns_u)
{
......@@ -681,7 +681,7 @@ public:
}
}
auto iter = ns_v.find(std::make_tuple(t, l));
auto iter = ns_v.find({t, l});
if (iter != ns_v.end())
{
auto& e = iter->second.front();
......@@ -692,7 +692,7 @@ public:
else
{
auto e = add_edge(v, t, _g).first;
ns_v[std::make_tuple(t, l)].push_back(e);
ns_v[{t, l}].push_back(e);
eweight_c[e] = w;
rec_c[e] = ecc;
drec_c[e] = decc;
......@@ -706,9 +706,9 @@ public:
ns_v.clear();
for(auto e : in_edges_range(v, _g))
ns_v[std::make_tuple(source(e, _g), ec[e])].push_back(e);
ns_v[{source(e, _g), ec[e]}].push_back(e);
for(auto e : in_edges_range(u, _g))
ns_u[std::make_tuple(source(e, _g), ec[e])].push_back(e);
ns_u[{source(e, _g), ec[e]}].push_back(e);
for(auto& kv : ns_u)
{
......@@ -728,7 +728,7 @@ public:
decc += _drec[e];
}
auto iter = ns_v.find(std::make_tuple(s, l));
auto iter = ns_v.find({s, l});
if (iter != ns_v.end())
{
auto& e = iter->second.front();
......@@ -739,7 +739,7 @@ public:
else
{
auto e = add_edge(s, v, _g).first;
ns_v[std::make_tuple(s, l)].push_back(e);
ns_v[{s, l}].push_back(e);
eweight_c[e] = w;
rec_c[e] = ecc;
drec_c[e] = decc;
......@@ -778,9 +778,9 @@ public:
{
gt_hash_map<std::tuple<size_t, size_t>, size_t> hist;
for (auto& kn : degs[u])
hist[make_tuple(get<0>(kn), get<1>(kn))] += get<2>(kn);
hist[{get<0>(kn), get<1>(kn)}] += get<2>(kn);
for (auto& kn : degs[v])
hist[make_tuple(get<0>(kn), get<1>(kn))] += get<2>(kn);
hist[{get<0>(kn), get<1>(kn)}] += get<2>(kn);
degs[u].clear();
degs[v].clear();
auto& d = degs[v];
......@@ -1695,7 +1695,7 @@ public:
size_t s = _b[target(e, _g)];
if (!is_directed::apply<g_t>::type::value && s < r)
std::swap(r, s);
mrs[std::make_pair(r, s)] += _eweight[e];
mrs[{r, s}] += _eweight[e];
}
for (auto& rs_m : mrs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment