Move headers into include folder and add single header to include all reachability algorithms

This commit is contained in:
stefiosif
2022-10-14 18:38:01 +03:00
parent dc7fa93a6a
commit 92cf8950c2
14 changed files with 11 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
#ifndef BREADTH_FIRST_TREE_H_
#define BREADTH_FIRST_TREE_H_
#include "digraph.h"
namespace graph {
template<typename T>
class BreadthFirstTree : public Digraph<T> {
public:
BreadthFirstTree() = default;
BreadthFirstTree(std::unordered_map<T, std::unordered_set<T>> G, T root)
: BreadthFirstTree<T>(Digraph<T>(G), root) {}
BreadthFirstTree(Digraph<T> G, T root);
T root;
};
template<typename T>
BreadthFirstTree<T>::BreadthFirstTree(Digraph<T> G, T root) {
this->adjList = algo::BreadthFirstSearch<T>(G.adjList).execute(root);
}
} // namespace graph
#endif