From d7e87e09566948170e081678f2be0b6ef57df8b2 Mon Sep 17 00:00:00 2001 From: stefiosif Date: Sat, 15 Oct 2022 18:10:43 +0300 Subject: [PATCH] Update README, missing benchmarks --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a614731..d5df197 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Dynamic Reachability Algorithms [DRA] +# Reachability algorithms by Roditty and Zwick The goal of this project is to implement a collection of dynamic reachability algorithms covered in "Improved Dynamic Reachability Algorithms for Directed Graphs" by Liam Roditty and Uri Zwick. @@ -27,32 +27,32 @@ int main() { auto hk = new algo::HenzingerKing(G); hk->init(); - // Query the dynamic reachability algorithm - std::cout << "Path from 4 to 8 exists: " << hk.query(4, 8) << '\n'; - // Remove edges std::vector> delEdges( {4, 6}, {5, 6}, {3, 1} ); for (const auto& [u, v] : delEdges) - hk.remove(u, v); - - std::cout << "Path from 4 to 8 exists: " << dr.query(4, 8); + hk.remove(u, v); // Insert edges std::pair> addEdges( { 1 , {2, 3, 4, 5} } ); - hk.insert(u, { v }); + hk.insert(u, addEdges); - std::cout << "Path from 4 to 8 exists: " << dr.query(4, 8); + // Search query + std::cout << "Path from 4 to 8 exists: " << hk.query(4, 8) << '\n'; return 0; } ``` -## Run Locally +## Run locally Clone the repository with submodules (doctest/nanobench): ```bash git clone --recurse-submodules https://github.com/stefiosif/dynamic-reachability-algorithms +cd dynamic-reachability-algorithms ``` +# Benchmark + + ## References -* [Improved Dynamic Reachability Algorithms for Directed Graphs](www.google.com) +* [Improved Dynamic Reachability Algorithms for Directed Graphs](https://ieeexplore.ieee.org/document/1181993)