Remove "using namespace" from headers and make single param constructors explicit

This commit is contained in:
stefiosif
2022-12-03 15:43:00 +02:00
parent d7e87e0956
commit 7c78bbd7ca
9 changed files with 13 additions and 30 deletions

View File

@@ -7,8 +7,6 @@
#include <vector>
#include <ranges>
using namespace graph;
namespace algo {
template<typename T>
@@ -16,7 +14,7 @@ class Tarjan {
public:
Tarjan() = default;
Tarjan(std::unordered_map<T, std::unordered_set<T>> adjList) : adjList(adjList) {}
explicit Tarjan(std::unordered_map<T, std::unordered_set<T>> adjList) : adjList(adjList) {}
//
auto execute();
@@ -27,7 +25,7 @@ private:
std::unordered_map<T, std::unordered_set<T>> adjList;
std::stack<T> S;
std::int16_t index = 0;
std::vector<SCC<T>> SCCs;
std::vector<graph::SCC<T>> SCCs;
T cid;
struct Vertex {