Add new graph example
This commit is contained in:
@@ -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}},
|
||||
|
||||
Reference in New Issue
Block a user