Use clang-format
This commit is contained in:
@@ -5,30 +5,28 @@
|
||||
|
||||
namespace graph {
|
||||
|
||||
template<typename T>
|
||||
class BreadthFirstTree : public Digraph<T> {
|
||||
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<T>(Digraph<T>(G), root) {}
|
||||
|
||||
BreadthFirstTree(Digraph<T> G, T root);
|
||||
|
||||
void removeEdgeTo(const T& u);
|
||||
void removeEdgeTo(const T &u);
|
||||
|
||||
T root{};
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
BreadthFirstTree<T>::BreadthFirstTree(Digraph<T> G, T root) {
|
||||
this->adjList = algo::BreadthFirstSearch<T>(G.adjList).execute(root);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void BreadthFirstTree<T>::removeEdgeTo(const T& u) {
|
||||
for (const auto& x : this->vertices()) {
|
||||
for (const auto& y : this->adjList[x]) {
|
||||
template <typename T> void BreadthFirstTree<T>::removeEdgeTo(const T &u) {
|
||||
for (const auto &x : this->vertices()) {
|
||||
for (const auto &y : this->adjList[x]) {
|
||||
if (y == u) {
|
||||
this->remove(x, u);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user