Refactor: Remove unused method setGraph
This commit is contained in:
@@ -23,8 +23,6 @@ public:
|
||||
|
||||
// Search if target vertex exists in graph
|
||||
bool query(const T& root, const T& target);
|
||||
|
||||
void setGraph(std::map<T, std::set<T>> adjMatrix);
|
||||
private:
|
||||
// Represents the graph on which the algorithm will be executed
|
||||
std::map<T, std::set<T>> adjMatrix;
|
||||
@@ -77,11 +75,6 @@ bool BreadthFirstSearch<T>::query(const T& root, const T& target) {
|
||||
return false;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void BreadthFirstSearch<T>::setGraph(std::map<T, std::set<T>> adjMatrix) {
|
||||
this->adjMatrix = adjMatrix;
|
||||
}
|
||||
|
||||
} // namespace algo
|
||||
|
||||
#endif
|
||||
@@ -29,8 +29,6 @@ public:
|
||||
void remove(const T& u, const T& v) override;
|
||||
|
||||
std::map<T, SCC<T>> getSCCs() { return C; }
|
||||
|
||||
void setGraph(Digraph<T> G);
|
||||
private:
|
||||
// Array used to answer strong connectivity queries in O(1) time
|
||||
std::map<T, T> A;
|
||||
@@ -93,11 +91,6 @@ void RodittyZwick<T>::remove(const T& u, const T& v) {
|
||||
findSCC();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void RodittyZwick<T>::setGraph(Digraph<T> G) {
|
||||
this->G = G;
|
||||
}
|
||||
|
||||
}; // namespace algo
|
||||
|
||||
#endif
|
||||
@@ -18,11 +18,11 @@ public:
|
||||
|
||||
Tarjan(std::map<T, std::set<T>> adjMatrix) : adjMatrix(adjMatrix) {}
|
||||
|
||||
//
|
||||
auto execute();
|
||||
|
||||
//
|
||||
void strongConnect(const T& u);
|
||||
|
||||
void setGraph(std::map<T, std::set<T>> adjMatrix);
|
||||
private:
|
||||
std::map<T, std::set<T>> adjMatrix;
|
||||
std::stack<T> S;
|
||||
@@ -80,11 +80,6 @@ auto Tarjan<T>::execute() {
|
||||
return SCCs;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void Tarjan<T>::setGraph(std::map<T, std::set<T>> adjMatrix) {
|
||||
this->adjMatrix = adjMatrix;
|
||||
}
|
||||
|
||||
} // namespace algo
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user