1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <vector><--- Include file:  not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <queue><--- Include file:  not found. Please note: Cppcheck does not need standard library headers to get proper results.

#include "snippet/iterations.hpp"

#include "internal/dev_env.hpp"
#include "structure/graph.hpp"
#include "data_structure/disjoint_set.hpp"

template<class Graph>
uni::disjoint_set uni::internal::graph_impl::mixin<Graph>::components() const noexcept(NO_EXCEPT) {
    uni::disjoint_set disjoint_set(this->vertices());
    ITR(edges, *this) ITR(_id, u, v, _w, _idx, edges) {
        disjoint_set.merge(u, v);
    }
    return disjoint_set;
}