summaryrefslogtreecommitdiff
path: root/src/fracture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fracture.c')
-rw-r--r--src/fracture.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/fracture.c b/src/fracture.c
index 6050182..5256eac 100644
--- a/src/fracture.c
+++ b/src/fracture.c
@@ -417,14 +417,6 @@ int main(int argc, char *argv[]) {
thresholds[i] = net->thres[data->break_list[max_pos]];
}
- if (save_cluster_dist) {
- uint_t *tmp_cluster_dist = get_cluster_dist(net, &c);
- for (uint_t j = 0; j < g->dnv; j++) {
- cluster_size_dist[j] += tmp_cluster_dist[j];
- }
- free(tmp_cluster_dist);
- }
-
if (save_data) {
for (uint_t j = 0; j < data->num_broken; j++) {
@@ -462,6 +454,15 @@ int main(int argc, char *argv[]) {
fclose(net_out);
}
+ if (save_cluster_dist) {
+ uint_t *tmp_cluster_dist = get_cluster_dist(net, &c);
+ for (uint_t j = 0; j < g->dnv; j++) {
+ cluster_size_dist[j] += tmp_cluster_dist[j];
+ }
+ free(tmp_cluster_dist);
+ }
+
+
net_free(net, &c);
graph_free(g, &c);
}