Commit 8d546347 authored by Tiago Peixoto's avatar Tiago Peixoto

inference: speedup addition of new groups

parent 85d8c6c9
......@@ -1119,7 +1119,7 @@ public:
for (auto& p : _partition_stats)
p.add_block();
if (!_egroups.empty())
_egroups.init(_b, _eweight, _g, _bg);
_egroups.add_block();
if (_coupled_state != nullptr)
_coupled_state->coupled_resize_vertex(r);
sync_emat();
......
......@@ -67,6 +67,11 @@ public:
}
}
void add_block()
{
_egroups.emplace_back();
}
void clear()
{
_egroups.clear();
......
......@@ -1152,7 +1152,7 @@ public:
for (auto& p : _partition_stats)
p.add_block();
if (!_egroups.empty())
_egroups.init(_b, _eweight, _g, _bg);
_egroups.add_block();
if (_coupled_state != nullptr)
_coupled_state->coupled_resize_vertex(r);
sync_emat();
......
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