diff --git a/include/algorithm/king.h b/include/algorithm/king.h index 8681253..3ffd863 100644 --- a/include/algorithm/king.h +++ b/include/algorithm/king.h @@ -71,9 +71,13 @@ void King::remove(const T& u, const T& v) { template void King::insert(const T& c, const std::vector& vertices) { - for (const auto& v : vertices) + for (const auto& v : vertices) { this->G.insert(c, v); - init(); + } + In[c] = Italiano(BreadthFirstTree(this->G.reverse(), c)); + In[c].init(); + Out[c] = Italiano(BreadthFirstTree(this->G, c)); + Out[c].init(); } } // namespace algo