Add new graph example

This commit is contained in:
stefiosif
2022-07-12 14:44:43 +03:00
parent 601f80c8d4
commit 0f857a6c9e
4 changed files with 105 additions and 46 deletions

View File

@@ -1,12 +1,7 @@
#include <doctest/doctest.h>
#include "graph/scc.h"
#include "graph/digraph.h"
#include "algorithm/tarjan.h"
#include "tree/breadth_first_tree.h"
#include <vector>
using namespace graph;
using namespace tree;
@@ -27,7 +22,7 @@ TEST_SUITE("Tree") {
G.insert(6, 3);
G.insert(7, 2);
BreadthFirstTree<std::uint16_t> tree(G);
BreadthFirstTree<std::uint16_t> tree(G, 1);
std::map<std::uint16_t, std::set<std::uint16_t>> exp = {
{1, {2, 4}},