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/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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user