Commit 3cb74f60 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

graph_blockmodel.hh: Never remove block edges

parent 8b4a7059
......@@ -385,8 +385,8 @@ public:
_brec[me] -= _rec[e];
}
if (_mrs[me] == 0)
_emat.remove_me(r, s, me, _bg);
// if (_mrs[me] == 0)
// _emat.remove_me(me, _bg);
}
}
......
......@@ -128,7 +128,7 @@ public:
assert(_mrs[me] >= 0);
if (_mrs[me] == 0)
_emat.remove_me(r, s, me, _bg);
_emat.remove_me(me, _bg);
}
u = _overlap_stats.get_in_neighbour(v);
......@@ -146,7 +146,7 @@ public:
eop(e, me);
if (_mrs[me] == 0)
_emat.remove_me(s, r, me, _bg);
_emat.remove_me(me, _bg);
}
_overlap_stats.remove_half_edge(v, r, _b, _g);
......
......@@ -847,16 +847,14 @@ public:
_mat[s][r] = e;
}
void remove_me(vertex_t r, vertex_t s, const edge_t& me, BGraph& bg,
bool delete_edge = true)
void remove_me(const edge_t& me, BGraph& bg)
{
if (delete_edge)
{
_mat[r][s] = _null_edge;
if (!is_directed::apply<BGraph>::type::value)
_mat[s][r] = _null_edge;
remove_edge(me, bg);
}
auto r = source(me, bg);
auto s = target(me, bg);
_mat[r][s] = _null_edge;
if (!is_directed::apply<BGraph>::type::value)
_mat[s][r] = _null_edge;
remove_edge(me, bg);
}
const auto& get_null_edge() const { return _null_edge; }
......@@ -941,17 +939,15 @@ public:
_hash[r][s] = e;
}
void remove_me(vertex_t r, vertex_t s, const edge_t& me, BGraph& bg,
bool delete_edge = true)
void remove_me(const edge_t& me, BGraph& bg)
{
if (delete_edge)
{
if (!is_directed::apply<BGraph>::type::value && r > s)
std::swap(r, s);
assert(r < _hash.size());
_hash[r].erase(s);
remove_edge(me, bg);
}
auto r = source(me, bg);
auto s = target(me, bg);
if (!is_directed::apply<BGraph>::type::value && r > s)
std::swap(r, s);
assert(r < _hash.size());
_hash[r].erase(s);
remove_edge(me, bg);
}
const auto& get_null_edge() const { return _null_edge; }
......
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