Refactor file names to better understand inheritance of the skeleton of RZ algorithms
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
#ifndef RODITTY_ZWICK_H_
|
||||
#define RODITTY_ZWICK_H_
|
||||
#ifndef DECREMENTAL_REACHABILITY_H_
|
||||
#define DECREMENTAL_REACHABILITY_H_
|
||||
|
||||
#include "graph/digraph.h"
|
||||
|
||||
namespace algo {
|
||||
|
||||
template<typename T>
|
||||
class RodittyZwick {
|
||||
class DecrementalReachability {
|
||||
public:
|
||||
~RodittyZwick();
|
||||
virtual ~DecrementalReachability() {};
|
||||
|
||||
// This method is implemented and executed by all roditty and zwick
|
||||
// algorithms, it constructs the data structures used in other operations
|
||||
@@ -17,13 +19,10 @@ public:
|
||||
|
||||
// Remove edge e(u,v) and maintain the transitive closure matrix
|
||||
virtual void remove(const T& u, const T& v) =0;
|
||||
protected:
|
||||
Digraph<T> G;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
RodittyZwick<T>::~RodittyZwick() {
|
||||
|
||||
}
|
||||
|
||||
}; // namespace algo
|
||||
|
||||
#endif
|
||||
18
algorithm/dynamic_reachability.h
Normal file
18
algorithm/dynamic_reachability.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef DYNAMIC_REACHABILITY_H_
|
||||
#define DYNAMIC_REACHABILITY_H_
|
||||
|
||||
#include "algorithm/decremental_reachability.h"
|
||||
|
||||
namespace algo {
|
||||
|
||||
template<typename T>
|
||||
class DynamicReachability : public DecrementalReachability<T> {
|
||||
|
||||
// Insert edge e(u,v) and maintain the transitive closure matrix
|
||||
virtual void insert(const T& u, const T& v) =0;
|
||||
};
|
||||
|
||||
|
||||
} // namespace algo
|
||||
|
||||
#endif
|
||||
@@ -1,23 +0,0 @@
|
||||
#ifndef DYNAMIC_RODITTY_ZWICK_H_
|
||||
#ifndef DYNAMIC_RODITTY_ZWICK_H_
|
||||
|
||||
#include "algorithm/roditty_zwick.h"
|
||||
|
||||
namespace algo {
|
||||
|
||||
template<typename T>
|
||||
class DynamicRodittyZwick : public RodittyZwick {
|
||||
~DynamicRodittyZwick();
|
||||
|
||||
// Insert edge e(u,v) and maintain the transitive closure matrix
|
||||
virtual void insert(const T& u, const T& v) =0;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
inline DynamicRodittyZwick<T>::~DynamicRodittyZwick() {
|
||||
|
||||
}
|
||||
|
||||
} // namespace algo
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user