From f4acf57c88d9b0adeb7d707bd0740ab8d58acc35 Mon Sep 17 00:00:00 2001 From: stefiosif Date: Mon, 26 Sep 2022 12:33:13 +0300 Subject: [PATCH] Check if edge to be removed is part of the graph --- algorithm/italiano.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/algorithm/italiano.h b/algorithm/italiano.h index 32e3f40..acb0852 100644 --- a/algorithm/italiano.h +++ b/algorithm/italiano.h @@ -63,9 +63,9 @@ bool Italiano::query(const T& u, const T& v) { template void Italiano::remove(const T& u, const T& v) { - //TRYCATCH if (!this->G.adjMatrix[u].contains(v)) return; - std::map> H; + if (!this->G.adjMatrix[u].contains(v)) return; + std::map> H; for (const auto& w : this->G.vertices()) { if (RT[w].contains(u, v)) { if (E[v].inc.size() > 1)