summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-09-24 20:34:55 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-09-24 20:34:55 -0400
commit16f4e128ae1f1c5759c643f51c1f7e7bfa892dc4 (patch)
treed365183f1bdc56b6a88665391975005b957619e3 /lib
parentd9d3b0518ce5e0a52b9a0bae55fa5d8ca5b3c515 (diff)
downloadfuse_networks-16f4e128ae1f1c5759c643f51c1f7e7bfa892dc4.tar.gz
fuse_networks-16f4e128ae1f1c5759c643f51c1f7e7bfa892dc4.tar.bz2
fuse_networks-16f4e128ae1f1c5759c643f51c1f7e7bfa892dc4.zip
fixed measurements for new paradigm
Diffstat (limited to 'lib')
-rw-r--r--lib/include/clusters.hpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/include/clusters.hpp b/lib/include/clusters.hpp
index 0c562d8..0728b3e 100644
--- a/lib/include/clusters.hpp
+++ b/lib/include/clusters.hpp
@@ -8,9 +8,7 @@ private:
std::vector<unsigned> o;
public:
- std::vector<unsigned> c;
-
- ClusterTree(unsigned n) : p(n, -1), o(n, 1), c(n, 0) { c[0] = n; }
+ ClusterTree(unsigned n) : p(n, -1), o(n, 1) {}
unsigned findroot(unsigned i) {
if (p[i] < 0)
@@ -20,17 +18,12 @@ public:
}
void join(unsigned i, unsigned j) {
- c[o[i] - 1]--;
- c[o[j] - 1]--;
-
if (o[i] < o[j]) {
p[i] = j;
o[j] += o[i];
- c[o[j] - 1]++;
} else {
p[j] = i;
o[i] += o[j];
- c[o[i] - 1]++;
}
}