Minor project updates and add 2 example datasets
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#include <doctest/doctest.h>
|
||||
|
||||
#include "algorithm/decremental_scc.h"
|
||||
#include "algorithm/decremental_tc.h"
|
||||
#include "algorithm/frigioni.h"
|
||||
#include "algorithm/italiano.h"
|
||||
|
||||
using namespace graph;
|
||||
|
||||
@@ -95,7 +96,7 @@ TEST_SUITE("Decremental algorithms") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Decremental maintenance of the TC 1") {
|
||||
TEST_CASE("Italiano 1") {
|
||||
// 1 --> 2 --> 5 --> 7 --> 2
|
||||
// 1 --> 4 --> 3 --> 1
|
||||
// 4 --> 6 --> 3
|
||||
@@ -112,19 +113,19 @@ TEST_SUITE("Decremental algorithms") {
|
||||
|
||||
REQUIRE_EQ(G.adjMatrix.size(), 7);
|
||||
|
||||
algo::DecrementalTC<std::uint16_t> rz(G);
|
||||
algo::Italiano<std::uint16_t> rz(G);
|
||||
rz.init();
|
||||
|
||||
SUBCASE("DecrementalTC::query") {
|
||||
SUBCASE("Italiano::query") {
|
||||
|
||||
}
|
||||
|
||||
SUBCASE("DecrementalTC::remove") {
|
||||
SUBCASE("Italiano::remove") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Decremental maintenance of the TC 2") {
|
||||
TEST_CASE("Italiano 2") {
|
||||
// 1 --> 2 --> 3 --> 1
|
||||
// 3 --> 4 --> 5 --> 3
|
||||
// 2 --> 6 --> 7 --> 8 --> 6
|
||||
@@ -152,15 +153,96 @@ TEST_SUITE("Decremental algorithms") {
|
||||
|
||||
REQUIRE_EQ(G.adjMatrix.size(), 13);
|
||||
|
||||
algo::DecrementalTC<std::uint16_t> rz(G);
|
||||
algo::Italiano<std::uint16_t> rz(G);
|
||||
rz.init();
|
||||
|
||||
SUBCASE("DecrementalTC::query") {
|
||||
SUBCASE("Italiano::query") {
|
||||
|
||||
}
|
||||
|
||||
SUBCASE("DecrementalTC::remove") {
|
||||
SUBCASE("Italiano::remove") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Frigioni 1") {
|
||||
// 1 --> 2 --> 3 --> 1
|
||||
// 3 --> 4 --> 5 --> 3
|
||||
// 2 --> 6 --> 7 --> 8 --> 6
|
||||
// 6 --> 9 --> 10 --> 11 --> 12 --> 13 --> 9
|
||||
// 12 --> 10
|
||||
Digraph<std::uint16_t> G;
|
||||
G.insert(1, 2);
|
||||
G.insert(2, 3);
|
||||
G.insert(3, 1);
|
||||
G.insert(3, 4);
|
||||
G.insert(4, 5);
|
||||
G.insert(5, 3);
|
||||
G.insert(2, 6);
|
||||
G.insert(6, 7);
|
||||
G.insert(7, 8);
|
||||
G.insert(7, 9);
|
||||
G.insert(8, 6);
|
||||
G.insert(6, 9);
|
||||
G.insert(9, 10);
|
||||
G.insert(10, 11);
|
||||
G.insert(11, 12);
|
||||
G.insert(12, 13);
|
||||
G.insert(13, 9);
|
||||
G.insert(12, 10);
|
||||
|
||||
REQUIRE_EQ(G.adjMatrix.size(), 13);
|
||||
|
||||
algo::Frigioni<std::uint16_t> rz(G);
|
||||
rz.init();
|
||||
|
||||
SUBCASE("Frigioni::query") {
|
||||
|
||||
}
|
||||
|
||||
SUBCASE("Frigioni::remove") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Frigioni 2") {
|
||||
// 1 --> 2 --> 3 --> 1
|
||||
// 3 --> 4 --> 5 --> 3
|
||||
// 2 --> 6 --> 7 --> 8 --> 6
|
||||
// 6 --> 9 --> 10 --> 11 --> 12 --> 13 --> 9
|
||||
// 12 --> 10
|
||||
Digraph<std::uint16_t> G;
|
||||
G.insert(1, 2);
|
||||
G.insert(2, 3);
|
||||
G.insert(3, 1);
|
||||
G.insert(3, 4);
|
||||
G.insert(4, 5);
|
||||
G.insert(5, 3);
|
||||
G.insert(2, 6);
|
||||
G.insert(6, 7);
|
||||
G.insert(7, 8);
|
||||
G.insert(7, 9);
|
||||
G.insert(8, 6);
|
||||
G.insert(6, 9);
|
||||
G.insert(9, 10);
|
||||
G.insert(10, 11);
|
||||
G.insert(11, 12);
|
||||
G.insert(12, 13);
|
||||
G.insert(13, 9);
|
||||
G.insert(12, 10);
|
||||
|
||||
REQUIRE_EQ(G.adjMatrix.size(), 13);
|
||||
|
||||
algo::Frigioni<std::uint16_t> rz(G);
|
||||
rz.init();
|
||||
|
||||
SUBCASE("Frigioni::query") {
|
||||
|
||||
}
|
||||
|
||||
SUBCASE("Frigioni::remove") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user