7 # include <vcl_msvc_warnings.h> 15 std::sort(edges.begin(), edges.end());
20 std::vector<float> thr(nv, t);
22 int ne = (int)edges.size();
23 for (
int i = 0; i < ne; i++) {
32 if ((e.
w_ <= thr[v0]) &&
36 thr[v0] = e.
w_ + (t/ds.
size(v0));
void vbl_graph_partition(vbl_disjoint_sets &ds, std::vector< vbl_edge > &edges, float t)
t is a constant that determines the threshold on edge weight to form disconnected sets
void set_union(int set_id1, int set_id2)
Combine two sets into one.
Partitions a graph into disjoint connected components.
int find_set(int element) const
Find the set identifier that an element currently belongs to.
int size(int set_id) const
Returns the number of elements in set specified by set_id.