From dc58e4394cc02169cf2431d212e800366273930a Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 23 Jul 2022 08:22:58 -0700 Subject: [PATCH] sfdpgen: make 'get_stress' static This function is unused outside of its containing file and is only used when `DEBUG_PRINT` is defined. --- lib/sfdpgen/post_process.c | 4 +++- lib/sfdpgen/post_process.h | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sfdpgen/post_process.c b/lib/sfdpgen/post_process.c index 973113782..eb894074f 100644 --- a/lib/sfdpgen/post_process.c +++ b/lib/sfdpgen/post_process.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -545,7 +546,8 @@ 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){ +static UNUSED double get_stress(int m, int dim, int *iw, int *jw, double *w, + double *d, double *x, double scaling) { 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. */ diff --git a/lib/sfdpgen/post_process.h b/lib/sfdpgen/post_process.h index 245d3888f..84c58d593 100644 --- a/lib/sfdpgen/post_process.h +++ b/lib/sfdpgen/post_process.h @@ -81,6 +81,4 @@ 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); - /*--------------------------------------------------------------*/ -- 2.40.0