summaryrefslogtreecommitdiff
path: root/lib/get_dual_clusters.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/get_dual_clusters.c')
-rw-r--r--lib/get_dual_clusters.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/get_dual_clusters.c b/lib/get_dual_clusters.c
deleted file mode 100644
index 9336106..0000000
--- a/lib/get_dual_clusters.c
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#include "fracture.h"
-
-components_t *get_clusters(net_t *instance) {
- components_t *c =
- graph_components_get(instance->graph, instance->fuses, true);
- return c;
-}
-
-unsigned int *get_cluster_dist(net_t *instance) {
- components_t *c = get_clusters(instance);
- unsigned int *cluster_dist =
- (unsigned int *)calloc(instance->graph->dnv, sizeof(unsigned int));
-
- for (uint32_t i = 1; i <= c->n; i++) {
- unsigned int num_in_cluster = 0;
- for (unsigned int j = 0; j < instance->graph->dnv; j++) {
- if (c->labels[j] == i)
- num_in_cluster++;
- }
-
- if (num_in_cluster == 0)
- break;
-
- cluster_dist[num_in_cluster - 1]++;
- }
-
- graph_components_free(c);
-
- return cluster_dist;
-}