Refactor file names to better understand inheritance of the skeleton of RZ algorithms
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
#include <src/include/nanobench.h>
|
||||
#include <doctest/doctest.h>
|
||||
|
||||
#include "algorithm/decremental_scc.h"
|
||||
#include "algorithm/italiano.h"
|
||||
#include "algorithm/frigioni.h"
|
||||
#include "algorithm/tarjan.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
using namespace graph;
|
||||
|
||||
TEST_SUITE("Decremental algorithms") {
|
||||
|
||||
TEST_CASE("Decremental maintenance of SCCs 1") {
|
||||
std::ifstream infile("resources/dag.txt");
|
||||
std::uint16_t u, v;
|
||||
Digraph<std::uint16_t> G;
|
||||
|
||||
while (infile >> u >> v)
|
||||
G.insert(u, v);
|
||||
|
||||
auto SCCs = algo::Tarjan<std::uint16_t>(G.adjMatrix).execute();
|
||||
|
||||
// Testing whether an scc is a 1-vertex scc which after the normalization
|
||||
// has no edges, in this case we know tgat there exist no 2-vertex sccs
|
||||
for (auto& scc : SCCs) {
|
||||
CHECK_EQ(std::all_of(scc.adjMatrix.begin(), scc.adjMatrix.end(),
|
||||
[](const auto& p) {
|
||||
return p.second.size() == 0;
|
||||
}), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
8
benchmark/decremental_reachability_bench.cc
Normal file
8
benchmark/decremental_reachability_bench.cc
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <src/include/nanobench.h>
|
||||
#include <doctest/doctest.h>
|
||||
|
||||
using namespace graph;
|
||||
|
||||
TEST_SUITE("Decremental Reachability Bench") {
|
||||
|
||||
}
|
||||
8
benchmark/dynamic_reachability_bench.cc
Normal file
8
benchmark/dynamic_reachability_bench.cc
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <src/include/nanobench.h>
|
||||
#include <doctest/doctest.h>
|
||||
|
||||
using namespace graph;
|
||||
|
||||
TEST_SUITE("Dynamic Reachability Bench") {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user