]> granicus.if.org Git - graphviz/commitdiff
sparse Multilevel_MQ_Clustering_establish: remove unnecessary cast
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 29 Dec 2022 19:15:44 +0000 (11:15 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 30 Dec 2022 06:46:14 +0000 (22:46 -0800)
lib/sparse/mq.c

index 6c063ba9d1dca3052716af37c961241134739d27..6bf2ac17c0884ac5eaec282865016ce16a4eb330 100644 (file)
@@ -228,7 +228,7 @@ static Multilevel_MQ_Clustering Multilevel_MQ_Clustering_establish(Multilevel_MQ
   int n = grid->n, level = grid->level, nc = 0, nclusters = n;
   double mq = 0, mq_in = 0, mq_out = 0, mq_new, mq_in_new, mq_out_new, mq_max = 0, mq_in_max = 0, mq_out_max = 0;
   int *ia = A->ia, *ja = A->ja;
-  double *a, amax = 0;
+  double amax = 0;
   double *deg_intra = grid->deg_intra, *wgt = grid->wgt;
   double *deg_intra_new, *wgt_new = NULL;
   int i, j, k, jj, jc, jmax;
@@ -280,7 +280,7 @@ static Multilevel_MQ_Clustering Multilevel_MQ_Clustering_establish(Multilevel_MQ
      mq_new = mq_in_new/(k-1) - mq_out_new/((k-1)*(k-2))
      gain = mq_new - mq
   */
-  a = (double*) A->a;
+  double *a = A->a;
   for (i = 0; i < n; i++){
     if (matching[i] != UNMATCHED) continue;
     /* accumulate connections between i and clusters */