From c2c278784bc98ed4f4d2834be5e8bd88e9ba1294 Mon Sep 17 00:00:00 2001 From: stefiosif Date: Sun, 15 May 2022 00:39:36 +0300 Subject: [PATCH] Delete unused methods --- algorithm/tarjan.h | 4 ++-- graph/graph.h | 24 ++++-------------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/algorithm/tarjan.h b/algorithm/tarjan.h index a78d58a..b6223d7 100644 --- a/algorithm/tarjan.h +++ b/algorithm/tarjan.h @@ -37,7 +37,7 @@ private: }; template -inline void Tarjan::strongConnect(const T& v) { +void Tarjan::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::strongConnect(const T& v) { } template -inline std::vector> Tarjan::run() { +std::vector> Tarjan::run() { for (const auto& v : G.vertices) { if (vp[v].index == -1) { diff --git a/graph/graph.h b/graph/graph.h index cae2e89..2963e6f 100644 --- a/graph/graph.h +++ b/graph/graph.h @@ -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 vertices; - std::map> adjMatrix; + std::map> adjMatrix; }; template -inline void Graph::insert(const T& v) { +void Graph::insert(const T& v) { vertices.insert(v); } template -inline void Graph::insert(const T& v, const T& u) { +void Graph::insert(const T& v, const T& u) { vertices.insert(v); vertices.insert(u); - adjMatrix[v].push_back(u); -} - -template -inline void Graph::erase(T& v) { - // -} - -template -inline void Graph::erase(T& v, T& u) { - // + adjMatrix[v].insert(u); } } // namespace graph