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>
|
template<typename T>
|
||||||
void Italiano<T>::remove(const T& u, const T& v) {
|
void Italiano<T>::remove(const T& u, const T& v) {
|
||||||
//TRYCATCH if (!this->G.adjMatrix[u].contains(v)) return;
|
if (!this->G.adjMatrix[u].contains(v)) return;
|
||||||
std::map<T, std::stack<T>> H;
|
|
||||||
|
|
||||||
|
std::map<T, std::stack<T>> H;
|
||||||
for (const auto& w : this->G.vertices()) {
|
for (const auto& w : this->G.vertices()) {
|
||||||
if (RT[w].contains(u, v)) {
|
if (RT[w].contains(u, v)) {
|
||||||
if (E[v].inc.size() > 1)
|
if (E[v].inc.size() > 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user