Converting underlying DAG implementation to use vectors for storage

Reduces hashing required and speeds up traversals
This commit is contained in:
Ian Roddis
2021-09-22 14:19:20 -03:00
parent 33942e2c63
commit 510aa236c4
5 changed files with 114 additions and 59 deletions

View File

@@ -63,7 +63,9 @@ TEST_CASE("dag_traversal", "[dag]")
std::vector<size_t> visitOrder(N_VERTICES);
size_t i = 0;
while (!dag.allVisited()) {
const auto v = dag.visitNext().value();
auto o = dag.visitNext();
REQUIRE(o.has_value());
const auto v = o.value();
dag.completeVisit(v.first);
visitOrder[v.first] = i;
++i;