Commit 2d5051a9 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

inference: Cleanup propagate delta

parent f606acc2
......@@ -510,38 +510,6 @@ public:
});
}
}
// if (_coupled_state != nullptr && !_p_entries.empty())
// {
// _coupled_state->propagate_delta(m_entries.get_move().first,
// m_entries.get_move().second,
// _p_entries);
// }
}
void propagate_delta(size_t u, size_t v,
std::vector<std::tuple<size_t, size_t, int,
std::vector<double>>>& entries)
{
size_t r = (u != null_group) ? _b[u] : null_group;
size_t s = (v != null_group) ? _b[v] : null_group;
_m_entries.set_move(r, s, num_vertices(_bg));
for (auto& rsd : entries)
_m_entries.template insert_delta<true>(_b[get<0>(rsd)], _b[get<1>(rsd)],
get<2>(rsd));
apply_delta<true, true>(_m_entries);
entries.clear();
wentries_op(_m_entries, _emat,
[&](auto r, auto s, auto&, auto delta, auto& edelta)
{
if (delta == 0)
return;
entries.emplace_back(r, s, delta, get<0>(edelta));
});
if (_coupled_state != nullptr && !entries.empty())
_coupled_state->propagate_delta(r, s, entries);
}
void add_edge(const GraphInterface::edge_t& e)
......
......@@ -46,9 +46,6 @@ public:
virtual void remove_edge_rec(const GraphInterface::edge_t& e) = 0;
virtual void update_edge_rec(const GraphInterface::edge_t& e,
const std::vector<double>& delta) = 0;
virtual void propagate_delta(size_t u, size_t v,
std::vector<std::tuple<size_t, size_t, int,
std::vector<double>>>& entries) = 0;
virtual double recs_dS(size_t, size_t,
const std::vector<std::tuple<size_t, size_t,
GraphInterface::edge_t, int,
......
......@@ -969,12 +969,6 @@ struct Layers
BaseState::update_edge_rec(e, delta);
}
void propagate_delta(size_t r, size_t s, std::vector<std::tuple<size_t, size_t,
int, std::vector<double> >> & delta)
{
BaseState::propagate_delta(r, s, delta);
}
double recs_dS(size_t, size_t,
const std::vector<std::tuple<size_t, size_t,
GraphInterface::edge_t, int,
......
......@@ -1554,11 +1554,6 @@ public:
{
}
void propagate_delta(size_t, size_t, std::vector<std::tuple<size_t, size_t,
int, std::vector<double> >> &)
{
}
void init_mcmc(double c, double dl)
{
if (!std::isinf(c))
......
Supports Markdown
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