Check if edge to be removed is part of the graph
This commit is contained in:
@@ -63,9 +63,9 @@ bool Italiano<T>::query(const T& u, const T& v) {
|
||||
|
||||
template<typename T>
|
||||
void Italiano<T>::remove(const T& u, const T& v) {
|
||||
//TRYCATCH if (!this->G.adjMatrix[u].contains(v)) return;
|
||||
std::map<T, std::stack<T>> H;
|
||||
if (!this->G.adjMatrix[u].contains(v)) return;
|
||||
|
||||
std::map<T, std::stack<T>> H;
|
||||
for (const auto& w : this->G.vertices()) {
|
||||
if (RT[w].contains(u, v)) {
|
||||
if (E[v].inc.size() > 1)
|
||||
|
||||
Reference in New Issue
Block a user