This is always set to true.
}
StressMajorizationSmoother SparseStressMajorizationSmoother_new(SparseMatrix A, int dim, double lambda0, double *x,
- int weighting_scheme, int scale_initial_coord){
+ int weighting_scheme){
/* solve a stress model to achieve the ideal distance among a sparse set of edges recorded in A.
A must be a real matrix.
*/
iw[i+1] = nz;
id[i+1] = nz;
}
- if (scale_initial_coord){
- s = stop/sbot;
- } else {
- s = 1.;
- }
+ s = stop/sbot;
if (s == 0) {
return NULL;
}
enum {WEIGHTING_SCHEME_NONE, WEIGHTING_SCHEME_SQR_DIST};
SparseStressMajorizationSmoother SparseStressMajorizationSmoother_new(SparseMatrix A, int dim, double lambda, double *x,
- int weighting_scheme, int scale_initial_coord);
+ int weighting_scheme);
double SparseStressMajorizationSmoother_smooth(SparseStressMajorizationSmoother sm, int dim, double *x, int maxit_sm, double tol);
}
if (edge_len_weighted){
- sm = SparseStressMajorizationSmoother_new(A, dim, lambda, *x, WEIGHTING_SCHEME_SQR_DIST, TRUE);/* do not under weight the long distances */
+ sm = SparseStressMajorizationSmoother_new(A, dim, lambda, *x, WEIGHTING_SCHEME_SQR_DIST);/* do not under weight the long distances */
} else {
- sm = SparseStressMajorizationSmoother_new(A, dim, lambda, *x, WEIGHTING_SCHEME_NONE, TRUE);/* weight the long distances */
+ sm = SparseStressMajorizationSmoother_new(A, dim, lambda, *x, WEIGHTING_SCHEME_NONE);/* weight the long distances */
}
if (!sm) {