diff options
Diffstat (limited to 'src/get_dual_clusters.c')
-rw-r--r-- | src/get_dual_clusters.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/get_dual_clusters.c b/src/get_dual_clusters.c index 488793f..3a51c38 100644 --- a/src/get_dual_clusters.c +++ b/src/get_dual_clusters.c @@ -1,7 +1,7 @@ #include "fracture.h" -unsigned int *get_clusters(finst *instance, cholmod_common *c) { +unsigned int *get_clusters(net_t *instance, cholmod_common *c) { cholmod_sparse *s_dual = gen_adjacency(instance, true, false, 0, c); unsigned int *dual_marks = find_components(s_dual, 0); @@ -10,16 +10,16 @@ unsigned int *get_clusters(finst *instance, cholmod_common *c) { return dual_marks; } -unsigned int *get_cluster_dist(finst *instance, cholmod_common *c) { +unsigned int *get_cluster_dist(net_t *instance, cholmod_common *c) { unsigned int *clusters = get_clusters(instance, c); unsigned int *cluster_dist = (unsigned int *)calloc( - instance->network->num_dual_verts, sizeof(unsigned int)); + instance->graph->dnv, sizeof(unsigned int)); unsigned int cur_mark = 0; while (true) { cur_mark++; unsigned int num_in_cluster = 0; - for (unsigned int i = 0; i < instance->network->num_dual_verts; i++) { + for (unsigned int i = 0; i < instance->graph->dnv; i++) { if (clusters[i] == cur_mark) num_in_cluster++; } |