Remove "using namespace" from headers and make single param constructors explicit
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user