From 5877cd7ed84f359615e42a511229c9c35387d0c9 Mon Sep 17 00:00:00 2001 From: pants Date: Tue, 22 Nov 2016 00:09:06 -0500 Subject: changed analysis functions to include additional character --- data/anal_p.sh | 6 ++++++ data/ps.txt | 1 + src/anal_process.c | 2 +- src/big_anal_process.c | 2 +- src/cen_anal_process.c | 2 +- src/fracture.c | 17 +++++++++-------- src/long_anal_process.c | 2 +- 7 files changed, 20 insertions(+), 12 deletions(-) create mode 100755 data/anal_p.sh create mode 100644 data/ps.txt diff --git a/data/anal_p.sh b/data/anal_p.sh new file mode 100755 index 0000000..ac33bc1 --- /dev/null +++ b/data/anal_p.sh @@ -0,0 +1,6 @@ +../../bin/anal_process avln_b_s_o_c_c_* +../../bin/anal_process cstr_b_s_o_c_c_* +../../bin/cen_anal_process damg_b_s_o_c_c_* +../../bin/big_anal_process cond_b_s_o_c_c_* +../../bin/long_anal_process strs_b_s_o_c_c_* +../../bin/long_anal_process enrg_b_s_o_c_c_* diff --git a/data/ps.txt b/data/ps.txt new file mode 100644 index 0000000..1cb301b --- /dev/null +++ b/data/ps.txt @@ -0,0 +1 @@ +0. 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61 0.62 0.63 0.64 0.65 0.66 0.67 0.68 0.69 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8 0.81 0.82 0.83 0.84 0.85 0.86 0.87 0.88 0.89 0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1. diff --git a/src/anal_process.c b/src/anal_process.c index 0ebec84..c434297 100644 --- a/src/anal_process.c +++ b/src/anal_process.c @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) { char *fn = argv[1 + i]; char *buff = (char *)malloc(20 * sizeof(char)); uint_t pos = 0; uint_t c = 0; - while (c < 5) { + while (c < 6) { if (fn[pos] == '_') { c++; } diff --git a/src/big_anal_process.c b/src/big_anal_process.c index 0f7106f..f255f20 100644 --- a/src/big_anal_process.c +++ b/src/big_anal_process.c @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) { char *fn = argv[1 + i]; char *buff = (char *)malloc(20 * sizeof(char)); uint_t pos = 0; uint_t c = 0; - while (c < 5) { + while (c < 6) { if (fn[pos] == '_') { c++; } diff --git a/src/cen_anal_process.c b/src/cen_anal_process.c index 98f68ac..7aad0e2 100644 --- a/src/cen_anal_process.c +++ b/src/cen_anal_process.c @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) { char *fn = argv[1 + i]; char *buff = (char *)malloc(20 * sizeof(char)); uint_t pos = 0; uint_t c = 0; - while (c < 5) { + while (c < 6) { if (fn[pos] == '_') { c++; } 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); } diff --git a/src/long_anal_process.c b/src/long_anal_process.c index ba29152..df2dc63 100644 --- a/src/long_anal_process.c +++ b/src/long_anal_process.c @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) { char *fn = argv[1 + i]; char *buff = (char *)malloc(20 * sizeof(char)); uint_t pos = 0; uint_t c = 0; - while (c < 5) { + while (c < 6) { if (fn[pos] == '_') { c++; } -- cgit v1.2.3-70-g09d2