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/italiano.h"
using namespace graph;
namespace algo {
template<typename T>
@@ -13,7 +11,7 @@ class King : public DynamicReachability<T> {
public:
King() = default;
King(Digraph<T> G) { this->G = G; }
explicit King(graph::Digraph<T> G) { this->G = G; }
// Initialize decremental maintenance data structures for DAGs for each
// vertex's in and out reachability trees
@@ -50,7 +48,7 @@ void King<T>::init() {
template<typename T>
bool King<T>::query(const T& u, const T& v) {
return std::any_of(this->G.vertices().begin(), this->G.vertices().end(),
return std::ranges::any_of(this->G.vertices().begin(), this->G.vertices().end(),
[&](const T& w) {
return In[w].query(w, u) && Out[w].query(w, v);
});