Delete unused methods

This commit is contained in:
stefiosif
2022-05-15 00:39:36 +03:00
parent 8a52c80bc8
commit c2c278784b
2 changed files with 6 additions and 22 deletions

View File

@@ -37,7 +37,7 @@ private:
};
template<typename T>
inline void Tarjan<T>::strongConnect(const T& v) {
void Tarjan<T>::strongConnect(const T& v) {
vp[v].index = vp[v].lowlink = index++;
vp[v].onStack = true;
S.push(v);
@@ -67,7 +67,7 @@ inline void Tarjan<T>::strongConnect(const T& v) {
}
template<typename T>
inline std::vector<std::vector<T>> Tarjan<T>::run() {
std::vector<std::vector<T>> Tarjan<T>::run() {
for (const auto& v : G.vertices) {
if (vp[v].index == -1) {

View File

@@ -20,37 +20,21 @@ public:
// Add edge between v and u
void insert(const T& v, const T& u);
// Delete vertex v
void erase(T& v);
// Delete edge between v and u
void erase(T& v, T& u);
// Adjacency matrix representation
std::set<T> vertices;
std::map<T, std::vector<T>> adjMatrix;
std::map<T, std::set<T>> adjMatrix;
};
template<typename T>
inline void Graph<T>::insert(const T& v) {
void Graph<T>::insert(const T& v) {
vertices.insert(v);
}
template<typename T>
inline void Graph<T>::insert(const T& v, const T& u) {
void Graph<T>::insert(const T& v, const T& u) {
vertices.insert(v);
vertices.insert(u);
adjMatrix[v].push_back(u);
}
template<typename T>
inline void Graph<T>::erase(T& v) {
//
}
template<typename T>
inline void Graph<T>::erase(T& v, T& u) {
//
adjMatrix[v].insert(u);
}
} // namespace graph