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

@@ -4,8 +4,6 @@
#include "algorithm/dynamic_reachability.h"
#include "algorithm/frigioni.h"
using namespace graph;
constexpr int threshold = 5;
namespace algo {
@@ -15,7 +13,7 @@ class HenzingerKing : public DynamicReachability<T> {
public:
HenzingerKing() = default;
HenzingerKing(Digraph<T> G) { this->G = G; }
explicit HenzingerKing(graph::Digraph<T> G) { this->G = G; }
// Initialize decremental maintenance data structure and the empty set S
void init() override;
@@ -57,7 +55,7 @@ bool HenzingerKing<T>::query(const T& u, const T& v) {
if (frigioni.query(u, v))
return true;
return std::any_of(S.begin(), S.end(),
return std::ranges::any_of(S.begin(), S.end(),
[&](const T& w) {
return In[w].adjList.contains(u) &&
Out[w].adjList.contains(v);