]> granicus.if.org Git - graphviz/commitdiff
sfdpgen get_stress: remove unused 'data' parameter
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 23 Jul 2022 15:20:17 +0000 (08:20 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 29 Jul 2022 00:54:05 +0000 (17:54 -0700)
lib/sfdpgen/post_process.c
lib/sfdpgen/post_process.h

index d741238995916a2d614c60c36a522120e0c0d197..2d681bc6627854a398429636787e5eb31b37ed4a 100644 (file)
@@ -545,7 +545,7 @@ static void get_edge_label_matrix(relative_position_constraints data, int m, int
   *rhs = x00;
 }
 
-double get_stress(int m, int dim, int *iw, int *jw, double *w, double *d, double *x, double scaling, void *data, int weighted){
+double get_stress(int m, int dim, int *iw, int *jw, double *w, double *d, double *x, double scaling, int weighted){
   int i, j;
   double res = 0., dist;
   /* we use the fact that d_ij = w_ij*graph_dist(i,j). Also, d_ij and x are scalinged by *scaling, so divide by it to get actual unscaled streee. */
@@ -616,7 +616,7 @@ double StressMajorizationSmoother_smooth(StressMajorizationSmoother sm, int dim,
   iw = Lw->ia; jw = Lw->ja;
 
 #ifdef DEBUG_PRINT
-  if (Verbose) fprintf(stderr, "initial stress = %f\n", get_stress(m, dim, iw, jw, w, d, x, sm->scaling, sm->data, 1));
+  if (Verbose) fprintf(stderr, "initial stress = %f\n", get_stress(m, dim, iw, jw, w, d, x, sm->scaling, 1));
 #else
   (void)iw;
   (void)jw;
@@ -699,7 +699,7 @@ double StressMajorizationSmoother_smooth(StressMajorizationSmoother sm, int dim,
 
 #ifdef DEBUG_PRINT
     if (Verbose) {
-      fprintf(stderr, "stress1 = %g\n",get_stress(m, dim, iw, jw, w, d, x, sm->scaling, sm->data, 1));
+      fprintf(stderr, "stress1 = %g\n",get_stress(m, dim, iw, jw, w, d, x, sm->scaling, 1));
     }
 #endif
 
@@ -712,7 +712,7 @@ double StressMajorizationSmoother_smooth(StressMajorizationSmoother sm, int dim,
 
     if (flag) goto RETURN;
 #ifdef DEBUG_PRINT
-    if (Verbose) fprintf(stderr, "stress2 = %g\n",get_stress(m, dim, iw, jw, w, d, y, sm->scaling, sm->data, 1));
+    if (Verbose) fprintf(stderr, "stress2 = %g\n",get_stress(m, dim, iw, jw, w, d, y, sm->scaling, 1));
 #endif
     diff = total_distance(m, dim, x, y)/sqrt(vector_product(m*dim, x, x));
 #ifdef DEBUG_PRINT
@@ -730,7 +730,7 @@ double StressMajorizationSmoother_smooth(StressMajorizationSmoother sm, int dim,
 #endif
 
 #ifdef DEBUG_PRINT
-  if (Verbose) fprintf(stderr, "iter = %d, final stress = %f\n", iter, get_stress(m, dim, iw, jw, w, d, x, sm->scaling, sm->data, 1));
+  if (Verbose) fprintf(stderr, "iter = %d, final stress = %f\n", iter, get_stress(m, dim, iw, jw, w, d, x, sm->scaling, 1));
 #endif
 
  RETURN:
index a7f00b334929debe9b916ef3baefa5d46711aa21..45462d391da4ff24a91e5d03cbff7e5b93f02f86 100644 (file)
@@ -81,6 +81,6 @@ SparseStressMajorizationSmoother SparseStressMajorizationSmoother_new(SparseMatr
 
 double SparseStressMajorizationSmoother_smooth(SparseStressMajorizationSmoother sm, int dim, double *x, int maxit_sm, double tol);
 
-double get_stress(int m, int dim, int *iw, int *jw, double *w, double *d, double *x, double scaling, void *data, int weighted);
+double get_stress(int m, int dim, int *iw, int *jw, double *w, double *d, double *x, double scaling, int weighted);
 
 /*--------------------------------------------------------------*/